Re: [Phplib-users] print fields after executing a query
Brought to you by:
nhruby,
richardarcher
From: Lindsay H. <fm...@fm...> - 2002-02-12 22:34:56
|
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 -- Lindsay Haisley | "Everything works | PGP public key FMP Computer Services | if you let it" | available at 512-259-1190 | (The Roadie) | <http://www.fmp.com/pubkeys> http://www.fmp.com | | |