Re: [Phplib-users] print fields after executing a query
Brought to you by:
nhruby,
richardarcher
From: Lindsay H. <fm...@fm...> - 2002-02-13 18:42:17
|
Thus spake Marco Müller on Tue, Feb 12, 2002 at 05:40:13PM CST > > 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!!! Actually not. It's not quite the same in php's database support, but many db APIs and UIs support the concept of a BOF - "Beginning Of File" pseudo-record, just as they support an EOF - "End Of File" pseudo-record. if you decrement the record pointer when you're on the first record or increment it when you're on the last record you're positioned on one of these, respecively - a condition that can be tested with something like "if (BOF)" or "if (EOF)", and you may or may not be able to access real data in such a case. In phplib it's not quite the same, but similarly, you have to explicitly position to a real record in a query result before you can get real data out of it. -- 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 | | |