unread
In most databases an queries , there is primary key/unique constraint so i suggest to enhnace function pg_fetch_all ( resource result)
to
pg_fetch_all ( resource result,[string key_column_name]) bz adding a second optional parameter, so anybody can access all returned data like this:
$data= pg_fetch_all ($resource,$key_column_name]);
$column=$data['value of the key, specified in 2nd argument to pg_fetch_all' ]['name of the column'];
ie all tuples/lines from result can be accessed via associative array, with key is the value of specified column.
Yes, I think it can be done by wery simle code too, but....