note 20748 added to function.pg-field-name

From: Date: Mon, 15 Apr 2002 03:54:20 +0000
Subject: note 20748 added to function.pg-field-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-29353@lists.php.net to get a copy of this message
Since postgresql has no pre-defined way of describing a table, is there any supplied php-pg wrapper that supplies this functionality? I have considered the following 'solutions' to, but they all hacks: * php or perl interface to psql * user function using pg_class, etc * home made sql query like //select * from table, limit count 1 $result = pg_query($query); for($i=0;$i<pg_num_fields($result);i++){ $name = pg_field_name($result,$i); $type = pg_field_type($result,$i); print("$name: $name type: $type"); } -- http://www.php.net/manual/en/function.pg-field-name.php http://master.php.net/manage/user-notes.php?action=edit+20748 http://master.php.net/manage/user-notes.php?action=delete+20748 http://master.php.net/manage/user-notes.php?action=reject+20748

« previous php.notes (#29353) next »