faqts : Computers : Programming : Languages : PHP : General Information : PHP Based Projects : PHPLIB

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 16 people (38%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

My query succeeds, so why doesn't $db->f(field) in PHPLIB return anything?
What is $db->next_record() used for in PHPLIB?

Jul 2nd, 1999 17:58
Nathan Wallace, Philip Olson, Youngbong Choe


In PHPLIB, next_record() gets the next row returned by the query.  It
basically just calls *_fetch_array().  If you do not call next_record()
the fields are not available for accessing using f() and thus will
return nothing.
    $q->next_record(); // use this method before $q->f()
    $id = $q->f("id");
You can get more information in the manual at:
    http://phplib.shonline.de