note 34812 added to function.pg-insert

From: Date: Thu, 07 Aug 2003 12:41:32 +0000
Subject: note 34812 added to function.pg-insert
Groups: php.notes 
Request: Send a blank email to php-notes+get-53566@lists.php.net to get a copy of this message
Note to the previous note by "rorezende at hotmail dot com" : pg_convert is propably supposed to convert null values as to nulls as well, so your hand made "pg_insert" should check for them also. For example the latter else could be written as follows: if($value == null) { $str .= "null,"; } else { $str .= "$value,"; } Otherwise a lot better coded than my version was. ;) ---- Manual Page -- http://www.php.net/manual/en/function.pg-insert.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34812 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34812&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34812&report=yes

« previous php.notes (#53566) next »