0
Recordset Array
LEGEND
,
/t5/dreamweaver-discussions/recordset-array/td-p/552797
Dec 10, 2007
Dec 10, 2007
Copy link to clipboard
Copied
Hi,
I need to format a recordset into a particular format i.e.
Dim myDataStore
MyDataStore = ...
so that myDataStore =
[ 'record1field1',
'record1field2','record1field3','record1field4','record1field5'], [
'record2field1',
'record2field2','record2field3','record2field4','record2field5'], etc
I can do this OK for 1 record and know I need so kind of loop but am not
sure how to go about for the whole recordset?
Any ideas?
Thanks!
I need to format a recordset into a particular format i.e.
Dim myDataStore
MyDataStore = ...
so that myDataStore =
[ 'record1field1',
'record1field2','record1field3','record1field4','record1field5'], [
'record2field1',
'record2field2','record2field3','record2field4','record2field5'], etc
I can do this OK for 1 record and know I need so kind of loop but am not
sure how to go about for the whole recordset?
Any ideas?
Thanks!
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Newsgroup_User
AUTHOR
LEGEND
,
LATEST
/t5/dreamweaver-discussions/recordset-array/m-p/552798#M197348
Dec 11, 2007
Dec 11, 2007
Copy link to clipboard
Copied
Sounds like you want a for loop
asp has for each construct
php has foreach and a while construct
for a while loop you need to know how many records you are going to
process into memory (the array)
MM User wrote:
> Hi,
>
> I need to format a recordset into a particular format i.e.
>
> Dim myDataStore
>
> MyDataStore = ...
>
> so that myDataStore =
>
> [ 'record1field1',
> 'record1field2','record1field3','record1field4','record1field5'], [
> 'record2field1',
> 'record2field2','record2field3','record2field4','record2field5'], etc
>
> I can do this OK for 1 record and know I need so kind of loop but am
> not sure how to go about for the whole recordset?
>
> Any ideas?
>
> Thanks!
--
asp has for each construct
php has foreach and a while construct
for a while loop you need to know how many records you are going to
process into memory (the array)
MM User wrote:
> Hi,
>
> I need to format a recordset into a particular format i.e.
>
> Dim myDataStore
>
> MyDataStore = ...
>
> so that myDataStore =
>
> [ 'record1field1',
> 'record1field2','record1field3','record1field4','record1field5'], [
> 'record2field1',
> 'record2field2','record2field3','record2field4','record2field5'], etc
>
> I can do this OK for 1 record and know I need so kind of loop but am
> not sure how to go about for the whole recordset?
>
> Any ideas?
>
> Thanks!
--
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

