note 108335 added to function.pg-query-params
| From: | alec at smecher dot bc dot ca | Date: | Wed, 18 Apr 2012 03:17:28 +0000 |
| Subject: | note 108335 added to function.pg-query-params | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187215@lists.php.net to get a copy of this message | ||
Note that due to your locale's number formatting settings, you may not be able to pass a
numeric value in as a parameter and have it arrive in PostgreSQL still a number.
If your system locale uses "," as a decimal separator, the following will result in a
database error:
pg_query_params($conn, 'SELECT $1::numeric', array(3.5));
For this to work, it's necessary to manually convert 3.5 to a string using e.g. number_format.
(I filed this as bug #46408, but apparently it's expected behavior.)
----
Server IP: 66.207.199.35
Probable Submitter: 24.80.160.155
----
Manual Page -- http://www.php.net/manual/en/function.pg-query-params.php
Edit -- https://master.php.net/note/edit/108335
Del: integrated -- https://master.php.net/note/delete/108335/integrated
Del: useless -- https://master.php.net/note/delete/108335/useless
Del: bad code -- https://master.php.net/note/delete/108335/bad+code
Del: spam -- https://master.php.net/note/delete/108335/spam
Del: non-english -- https://master.php.net/note/delete/108335/non-english
Del: in docs -- https://master.php.net/note/delete/108335/in+docs
Del: other reasons-- https://master.php.net/note/delete/108335
Reject -- https://master.php.net/note/reject/108335
Search -- https://master.php.net/manage/user-notes.php