[cfaussie] Re: outputting recordset

2007-04-06 Thread Andrew Scott
This is what I like about programming, even in parallel developing there is
always more ways to skin the cat.




On 4/5/07, Steve Onnis <[EMAIL PROTECTED]> wrote:
>
>
> Ok
>
> thought I would put my 2cents in here.  I figured if you wanted to adapt
> it
> for more than 3 columns or less than 3 columns it would be silly to be
> hard
> coding in cells so here you go.
>
> 
>  listToArray("1,2,3,4,5,6,7,8,9,10,11")) />
> 
> 
>
> 
> 
> 
>
>
>
>
>#query["column"][row + ((rows * cell))]#
>
> 
>
>
>
>
> 
> 
> 
>
>
> This will also fill any empty cells automatically
>
> Have fun
>
> Steve Onnis
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-05 Thread Steve Onnis

Ok
 
thought I would put my 2cents in here.  I figured if you wanted to adapt it
for more than 3 columns or less than 3 columns it would be silly to be hard
coding in cells so here you go.
 












#query["column"][row + ((rows * cell))]#

 









This will also fill any empty cells automatically

Have fun

Steve Onnis



From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Thursday, 5 April 2007 6:12 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: outputting recordset


Yes they are very quick and it wouldn't make any perfomace issue one way or
the other.


 
On 4/5/07, Dale Fraser <[EMAIL PROTECTED]> wrote: 


Ahh,

Picky, in my defence, array functions are very quick :P

Regards
Dale Fraser

http://dale.fraser.id.au/blog


-Original Message-
From: cfaussie@googlegroups.com [mailto: cfaussie@googlegroups.com
<mailto:cfaussie@googlegroups.com> ] On Behalf
Of Scott Thornton
Sent: Thursday, 5 April 2007 4:26 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] outputting recordset 


Hi,

You probably don't want to calculate the length of the array within
every
iteration of the loop if it does not change.





>>> "Dale Fraser" < [EMAIL PROTECTED]> 05/04/2007 3:29 pm >>>
Working example.





 







 

 



 #data[i]#

 #data[i+rows*1]#

 #data[i+rows*2]#

   

 

 

 



Regards

Dale Fraser



http://dale.fraser.id.au/blog



_

From: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com>
[mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 3:22 PM
To: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> 
Subject: [cfaussie] Re: outputting recordset



Hi Seona,



that is it! Thanks.



* count
* count + divisor
* count + (divisor * 2)



On 4/5/07, Seona Bellamy < [EMAIL PROTECTED]> wrote:

On 05/04/07, Dale Fraser < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED] > >
wrote:

So are you saying a fixed number of rows 6

Or a fixed number of columns 3?


I believe the line in the original email was:




I need to output a recordset in a table, infinite rows, and maximum
3 
columns in width.


I'm more interested in knowing if there was a reason for the number
of empty
cells in the third column. Because I'm pretty sure that the columns
could
have been closer to even in length, and that would be easier to do I
think. 
The maths is making better sense in my head, anyway. Then again,
knowing my
history with maths, I'm not sure that's saying much...

Basically, what I'm thinking is something along these lines:

* Divide your number of records by 3 and round it off to an integer
(I'll
call this divisor). This is the number of records you will have in
each of
the first two (complete) columns. The third column may or may not
have this 
many records.

* Loop over your recordset this many times, with a counter of some
sort to
count the iterations.

* In the loop, get the three cells as follows:
* count
* count + divisor
* count + (divisor * 2) 

I haven't tested this, so it's purely theoretical and may or may not
work.
Oh, and you'd probably want to test if the value exists in the third
column
because that one may not be full.


Cheers,

Seona.



We

[cfaussie] Re: outputting recordset

2007-04-05 Thread Dale Fraser

Ahh,

Picky, in my defence, array functions are very quick :P

Regards
Dale Fraser
 
http://dale.fraser.id.au/blog
 

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Thornton
Sent: Thursday, 5 April 2007 4:26 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] outputting recordset


Hi,

You probably don't want to calculate the length of the array within every
iteration of the loop if it does not change.





>>> "Dale Fraser" <[EMAIL PROTECTED]> 05/04/2007 3:29 pm >>>
Working example.

 







 



  

  



  #data[i]#

  #data[i+rows*1]#

  #data[i+rows*2]#



  

  



 

Regards

Dale Fraser

 

http://dale.fraser.id.au/blog 

 

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 3:22 PM
To: cfaussie@googlegroups.com 
Subject: [cfaussie] Re: outputting recordset

 

Hi Seona,

 

that is it! Thanks.

 

 * count
 * count + divisor
 * count + (divisor * 2) 

 

On 4/5/07, Seona Bellamy <[EMAIL PROTECTED]> wrote: 

On 05/04/07, Dale Fraser < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote: 

So are you saying a fixed number of rows 6

Or a fixed number of columns 3?


I believe the line in the original email was: 
 

 

I need to output a recordset in a table, infinite rows, and maximum 3
columns in width.


I'm more interested in knowing if there was a reason for the number of empty
cells in the third column. Because I'm pretty sure that the columns could
have been closer to even in length, and that would be easier to do I think.
The maths is making better sense in my head, anyway. Then again, knowing my
history with maths, I'm not sure that's saying much... 

Basically, what I'm thinking is something along these lines:

* Divide your number of records by 3 and round it off to an integer (I'll
call this divisor). This is the number of records you will have in each of
the first two (complete) columns. The third column may or may not have this
many records. 

* Loop over your recordset this many times, with a counter of some sort to
count the iterations.

* In the loop, get the three cells as follows:
  * count
  * count + divisor
  * count + (divisor * 2) 

I haven't tested this, so it's purely theoretical and may or may not work.
Oh, and you'd probably want to test if the value exists in the third column
because that one may not be full.


Cheers, 

Seona. 



Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 












--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-05 Thread Andrew Scott
Yes they are very quick and it wouldn't make any perfomace issue one way or
the other.



On 4/5/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>
> Ahh,
>
> Picky, in my defence, array functions are very quick :P
>
> Regards
> Dale Fraser
>
> http://dale.fraser.id.au/blog
>
>
> -Original Message-
> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf
> Of Scott Thornton
> Sent: Thursday, 5 April 2007 4:26 PM
> To: cfaussie@googlegroups.com
> Subject: [cfaussie] outputting recordset
>
>
> Hi,
>
> You probably don't want to calculate the length of the array within every
> iteration of the loop if it does not change.
>
> 
>
>
>
> >>> "Dale Fraser" <[EMAIL PROTECTED]> 05/04/2007 3:29 pm >>>
> Working example.
>
>
>
> 
>
> 
>
> 
>
>
>
> 
>
>  
>
>  
>
>
>
>  #data[i]#
>
>   arrayLen(data)>#data[i+rows*1]#
>
>   arrayLen(data)>#data[i+rows*2]#
>
>
>
>  
>
>  
>
> 
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dale.fraser.id.au/blog
>
>
>
> _
>
> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf
> Of Taco Fleur
> Sent: Thursday, 5 April 2007 3:22 PM
> To: cfaussie@googlegroups.com
> Subject: [cfaussie] Re: outputting recordset
>
>
>
> Hi Seona,
>
>
>
> that is it! Thanks.
>
>
>
> * count
> * count + divisor
> * count + (divisor * 2)
>
>
>
> On 4/5/07, Seona Bellamy <[EMAIL PROTECTED]> wrote:
>
> On 05/04/07, Dale Fraser < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
> wrote:
>
> So are you saying a fixed number of rows 6
>
> Or a fixed number of columns 3?
>
>
> I believe the line in the original email was:
>
>
>
>
> I need to output a recordset in a table, infinite rows, and maximum 3
> columns in width.
>
>
> I'm more interested in knowing if there was a reason for the number of
> empty
> cells in the third column. Because I'm pretty sure that the columns could
> have been closer to even in length, and that would be easier to do I
> think.
> The maths is making better sense in my head, anyway. Then again, knowing
> my
> history with maths, I'm not sure that's saying much...
>
> Basically, what I'm thinking is something along these lines:
>
> * Divide your number of records by 3 and round it off to an integer (I'll
> call this divisor). This is the number of records you will have in each of
> the first two (complete) columns. The third column may or may not have
> this
> many records.
>
> * Loop over your recordset this many times, with a counter of some sort to
> count the iterations.
>
> * In the loop, get the three cells as follows:
> * count
> * count + divisor
> * count + (divisor * 2)
>
> I haven't tested this, so it's purely theoretical and may or may not work.
> Oh, and you'd probably want to test if the value exists in the third
> column
> because that one may not be full.
>
>
> Cheers,
>
> Seona.
>
>
>
> Web Design, Web development, Graphic Design and Complete Internet
> Solutions
> an industry leader with commercial IT experience since 1994 .
>
>
>
>
>
>
>
>
>
>
>
>
> >
>


-- 



Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Dale Fraser
Working example.

 







 



  

  



  #data[i]#

  #data[i+rows*1]#

  #data[i+rows*2]#



  

  



 

Regards

Dale Fraser

 

http://dale.fraser.id.au/blog

 

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 3:22 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: outputting recordset

 

Hi Seona,

 

that is it! Thanks.

 

 * count
 * count + divisor
 * count + (divisor * 2) 

 

On 4/5/07, Seona Bellamy <[EMAIL PROTECTED]> wrote: 

On 05/04/07, Dale Fraser < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote: 

So are you saying a fixed number of rows 6

Or a fixed number of columns 3?


I believe the line in the original email was: 
 

 

I need to output a recordset in a table, infinite rows, and maximum 3
columns in width.


I'm more interested in knowing if there was a reason for the number of empty
cells in the third column. Because I'm pretty sure that the columns could
have been closer to even in length, and that would be easier to do I think.
The maths is making better sense in my head, anyway. Then again, knowing my
history with maths, I'm not sure that's saying much... 

Basically, what I'm thinking is something along these lines:

* Divide your number of records by 3 and round it off to an integer (I'll
call this divisor). This is the number of records you will have in each of
the first two (complete) columns. The third column may or may not have this
many records. 

* Loop over your recordset this many times, with a counter of some sort to
count the iterations.

* In the loop, get the three cells as follows:
  * count
  * count + divisor
  * count + (divisor * 2) 

I haven't tested this, so it's purely theoretical and may or may not work.
Oh, and you'd probably want to test if the value exists in the third column
because that one may not be full.


Cheers, 

Seona. 



Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Pete

this should helpremember a query can be treated as an array, so
you'll be able to substitute your code into this without too many
problems.



















#a[array_index]#

 






On Apr 5, 1:03 pm, "Taco Fleur" <[EMAIL PROTECTED]> wrote:
> fixed number of columns, i.e. 3
>
> On 4/5/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> >  So are you saying a fixed number of rows 6
>
> > Or a fixed number of columns 3?
>
> > Regards
>
> > Dale Fraser
>
> >http://dale.fraser.id.au/blog
>
> >  --
>
> > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Taco Fleur
> > *Sent:* Thursday, 5 April 2007 2:33 PM
> > *To:* cfaussie@googlegroups.com
> > *Subject:* [cfaussie] outputting recordset
>
> > Hi all,
>
> > I have a problem I can't seem to get my head around, any help is
> > appreciated.
>
> > I need to output a recordset in a table, infinite rows, and maximum 3
> > columns in width.
>
> > Output need to be as following though;
>
> > 1 - 7 - 13
>
> > 2 - 8 - 14
>
> > 3 - 9 - 15
>
> > 4 - 10 - []
>
> > 5 - 11 - []
>
> > 6 - 12 - []
>
> > --
> > Taco Fleur -http://www.pacificfox.com.au
> > Web Design, Web development, Graphic Design and Complete Internet
> > Solutions
> > an industry leader with commercial IT experience since 1994 ...
>
> --
> Taco Fleur -http://www.pacificfox.com.au
> Web Design, Web development, Graphic Design and Complete Internet Solutions
> an industry leader with commercial IT experience since 1994 ...- Hide quoted 
> text -
>
> - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Taco Fleur
Hi Seona,

that is it! Thanks.

 * count
 * count + divisor
 * count + (divisor * 2)


On 4/5/07, Seona Bellamy <[EMAIL PROTECTED]> wrote:
>
> On 05/04/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
> >
> >  So are you saying a fixed number of rows 6
> >
> > Or a fixed number of columns 3?
> >
>
> I believe the line in the original email was:
>
>
>I need to output a recordset in a table, infinite rows, and maximum 3
> > columns in width.
> >
>
> I'm more interested in knowing if there was a reason for the number of
> empty cells in the third column. Because I'm pretty sure that the columns
> could have been closer to even in length, and that would be easier to do I
> think. The maths is making better sense in my head, anyway. Then again,
> knowing my history with maths, I'm not sure that's saying much...
>
> Basically, what I'm thinking is something along these lines:
>
> * Divide your number of records by 3 and round it off to an integer (I'll
> call this divisor). This is the number of records you will have in each of
> the first two (complete) columns. The third column may or may not have this
> many records.
>
> * Loop over your recordset this many times, with a counter of some sort to
> count the iterations.
>
> * In the loop, get the three cells as follows:
>   * count
>   * count + divisor
>   * count + (divisor * 2)
>
> I haven't tested this, so it's purely theoretical and may or may not work.
> Oh, and you'd probably want to test if the value exists in the third column
> because that one may not be full.
>
>
> Cheers,
>
> Seona.
>
> >
>


-- 
Taco Fleur - http://www.pacificfox.com.au
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 …

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Taco Fleur
this is what I currently have, which is not what I am after as it produces

1 2 3
4 5 6
7 8 9
10 11 12
etc

variables.column = 3;
variables.row = ceiling( rsSubCategory.recordCount / variables.column );


   #rsCategory.title#
   

 
  
   variables.index = ( variables.i * variables.column ) + variables.j;
  
  
   
#variables.index#

   
  
   
  
 

   
  




On 4/5/07, Seona Bellamy <[EMAIL PROTECTED]> wrote:
>
> On 05/04/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
> >
> >
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Andrew Scott
Taco,

 

Doesn't Mod 3 work for you?

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 3:03 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: outputting recordset

 

fixed number of columns, i.e. 3

On 4/5/07, Dale Fraser <[EMAIL PROTECTED]> wrote: 

So are you saying a fixed number of rows 6

 

Or a fixed number of columns 3?

 

Regards

Dale Fraser

 

http://dale.fraser.id.au/blog 

 

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 2:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] outputting recordset

 

Hi all,

 

I have a problem I can't seem to get my head around, any help is
appreciated.

 

I need to output a recordset in a table, infinite rows, and maximum 3
columns in width.

Output need to be as following though;

 

1 - 7 - 13

2 - 8 - 14

3 - 9 - 15

4 - 10 - []

5 - 11 - []

6 - 12 - []

-- 
Taco Fleur - http://www.pacificfox.com.au <http://www.pacificfox.com.au/>  
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 

 


http://www.pacificfox.com.au 
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Steve Onnis
wouldnt that be
 
1 - 6 - 11
2 - 7 - 12
3 - 8 - 13
4 - 9 - 14
5 - 10 - 15
 
?


  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 2:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] outputting recordset


Hi all,
 
I have a problem I can't seem to get my head around, any help is
appreciated.
 
I need to output a recordset in a table, infinite rows, and maximum 3
columns in width.
Output need to be as following though;
 
1 - 7 - 13
2 - 8 - 14
3 - 9 - 15
4 - 10 - []
5 - 11 - []
6 - 12 - []

-- 
Taco Fleur - http://www.pacificfox.com.au 
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Taco Fleur
That would be, but trying to get a point across.

 1 - 7 - 13
2 - 8 - 14
3 - 9 - 15
4 - 10 - 16
5 - 11 - 17
6 - 12 - []



On 4/5/07, Steve Onnis <[EMAIL PROTECTED]> wrote:
>
>  wouldnt that be
>
>  1 - 6 - 11
> 2 - 7 - 12
> 3 - 8 - 13
> 4 - 9 - 14
> 5 - 10 - 15
>
> ?
>
>  --
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Taco Fleur
> *Sent:* Thursday, 5 April 2007 2:33 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] outputting recordset
>
>
>  Hi all,
>
> I have a problem I can't seem to get my head around, any help is
> appreciated.
>
> I need to output a recordset in a table, infinite rows, and maximum 3
> columns in width.
> Output need to be as following though;
>
> 1 - 7 - 13
> 2 - 8 - 14
> 3 - 9 - 15
> 4 - 10 - []
> 5 - 11 - []
> 6 - 12 - []
>
> --
> Taco Fleur - http://www.pacificfox.com.au
> Web Design, Web development, Graphic Design and Complete Internet
> Solutions
> an industry leader with commercial IT experience since 1994 …
>
> >
>
>



-- 
Taco Fleur - http://www.pacificfox.com.au
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 …

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Taco Fleur
fixed number of columns, i.e. 3

On 4/5/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>  So are you saying a fixed number of rows 6
>
>
>
> Or a fixed number of columns 3?
>
>
>
> Regards
>
> Dale Fraser
>
>
>
> http://dale.fraser.id.au/blog
>
>
>  --
>
> *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Taco Fleur
> *Sent:* Thursday, 5 April 2007 2:33 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* [cfaussie] outputting recordset
>
>
>
> Hi all,
>
>
>
> I have a problem I can't seem to get my head around, any help is
> appreciated.
>
>
>
> I need to output a recordset in a table, infinite rows, and maximum 3
> columns in width.
>
> Output need to be as following though;
>
>
>
> 1 - 7 - 13
>
> 2 - 8 - 14
>
> 3 - 9 - 15
>
> 4 - 10 - []
>
> 5 - 11 - []
>
> 6 - 12 - []
>
> --
> Taco Fleur - http://www.pacificfox.com.au
> Web Design, Web development, Graphic Design and Complete Internet
> Solutions
> an industry leader with commercial IT experience since 1994 …
>
>
>
> >
>


-- 
Taco Fleur - http://www.pacificfox.com.au
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 …

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Seona Bellamy
On 05/04/07, Dale Fraser <[EMAIL PROTECTED]> wrote:
>
>  So are you saying a fixed number of rows 6
>
> Or a fixed number of columns 3?
>

I believe the line in the original email was:

I need to output a recordset in a table, infinite rows, and maximum 3
> columns in width.
>

I'm more interested in knowing if there was a reason for the number of empty
cells in the third column. Because I'm pretty sure that the columns could
have been closer to even in length, and that would be easier to do I think.
The maths is making better sense in my head, anyway. Then again, knowing my
history with maths, I'm not sure that's saying much...

Basically, what I'm thinking is something along these lines:

* Divide your number of records by 3 and round it off to an integer (I'll
call this divisor). This is the number of records you will have in each of
the first two (complete) columns. The third column may or may not have this
many records.

* Loop over your recordset this many times, with a counter of some sort to
count the iterations.

* In the loop, get the three cells as follows:
  * count
  * count + divisor
  * count + (divisor * 2)

I haven't tested this, so it's purely theoretical and may or may not work.
Oh, and you'd probably want to test if the value exists in the third column
because that one may not be full.


Cheers,

Seona.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: outputting recordset

2007-04-04 Thread Dale Fraser
So are you saying a fixed number of rows 6

 

Or a fixed number of columns 3?

 

Regards

Dale Fraser

 

http://dale.fraser.id.au/blog

 

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Thursday, 5 April 2007 2:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] outputting recordset

 

Hi all,

 

I have a problem I can't seem to get my head around, any help is
appreciated.

 

I need to output a recordset in a table, infinite rows, and maximum 3
columns in width.

Output need to be as following though;

 

1 - 7 - 13

2 - 8 - 14

3 - 9 - 15

4 - 10 - []

5 - 11 - []

6 - 12 - []

-- 
Taco Fleur - http://www.pacificfox.com.au 
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---