note 20748 deleted from function.pg-field-name by alindeman

From: Date: Mon, 15 Apr 2002 21:44:22 +0000
Subject: note 20748 deleted from function.pg-field-name by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29401@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"); }

« previous php.notes (#29401) next »