Check the manual, it is very very good.
Boget, Chris wrote, On 12/30/2002 11:06 AM:
> * MySQL has a function to reset the result set so that it can be
> iterated through again - mysql_data_seek(). I don't see that there
> is a similar function for PGSQL. Is that true? If so, in order to
> reset the result set you have to perform the query again? Isn't
> that a waste of resources?
pg_fetch ... has a second parameter
array pg_fetch_array ( resource result [, int row [, int result_type]])
...
row is row (record) number to be retrieved. First row is 0.
$b=0;
while(pg_fetch_row($result,$b++)){} so you can seek where ever you want.
> * For PGSQL, you can get the database name, the field name
> even the *host name* but you can't get the table name from a
> particular query?
now check postgres manual, or once the php manual, how to get table
names, or etc.
http://www.php.net/manual/en/ref.pgsql.php
Comment:
passion at monkey dot org
27-Jun-2001 07:53
....
for tables:
SELECT relname FROM pg_class WHERE relname !~ '^pg_' and relkind='r';
C.