note 33171 added to function.pg-meta-data

From: Date: Wed, 18 Jun 2003 06:31:04 +0000
Subject: note 33171 added to function.pg-meta-data
Groups: php.notes 
Request: Send a blank email to php-notes+get-50558@lists.php.net to get a copy of this message
This function seems to be case-sensitive on tablename (php-4.3.1) The Array returned is of the following structure ['field name'] => Array ( ['num'] => Field number starting at 1 ['type'] => data type, eg varchar, int4 ['len'] => internal storage size of field. -1 for varying ['not null'] => boolean ['has default'] => boolean ) ...... for Varied size datatypes (varchar, text, etc) you can get the max data length from the system table pg_attribute.atttypmod -4 eg. select attnum, attname , atttypmod -4 as field_len from pg_attribute, pg_class where relname='$tablename' and attrelid=relfilenode and attnum>=1 ---- Manual Page -- http://www.php.net/manual/en/function.pg-meta-data.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33171 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33171&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33171&report=yes

« previous php.notes (#50558) next »