Re: [Phplib-users] print fields after executing a query
Brought to you by:
nhruby,
richardarcher
|
From: Marco <new...@dk...> - 2002-02-12 23:40:00
|
Thanks Lindsay. That's what I've read in the manual 5 minutes before.
:-) But thank's for information.
I thought that the pointer _is_ on the first row in the result after
executing the query. It's also nice for me to know that I can do a loop
with this. Fine!!!
Thanks!
Marco
Lindsay Haisley wrote:
>next_record() is a standard method call of the database object in phplib,
>and many database management APIs have a similar function. Retrieving data
>from a database is often a two step process. Part 1 is the query, and part
>2 is positioning the record pointer in the query results. You always have
>to call next_record() or some other function which actually positions the
>record pointer in order to retrieve actual db data. next_record() returns a
>null value when you reach the end of the query results, so you can do things
>like
>
>while ($db->next_record()) {
> ..... do something with the data
>}
>
>The loop will execute once for every record (row) in the query results.
>
>Thus spake Marco Müller on Tue, Feb 12, 2002 at 03:39:50PM CST
>
>>Hi Tarique, hi list,
>>
>>that was a real cool hint! ;-) Works fine for me now. But I think I've
>>to look in the manual to "understand" the hint. ;-)
>>
>>Thanks
>>Marco
>>
>>
>>Tarique Sani < @sanisoft.com=""> wrote:
>>
>>>On Tue, 12 Feb 2002, Marco [ISO-8859-1] Mler wrote:
>>>
>>>>The problem is: I've checked the fieldnames but - nothing is returned
>>>>with the command.
>>>>
>>>doing
>>>
>>>$db->next_record()
>>>
>>>before you try anything should help
>>>
>>>
>>>Tarique
>>>
>>
>>
>>_______________________________________________
>>Phplib-users mailing list
>>Php...@li...
>>https://lists.sourceforge.net/lists/listinfo/phplib-users
>>
>
|