List Info

Thread: note 78072 added to function.pg-query-params




note 78072 added to function.pg-query-params
user name
2007-09-26 17:57:31
When inserting into a pg column of type bool, you cannot
supply a PHP type of bool.  You must instead use a string
"t" or "f". PHP attempts to change
boolean values supplied as parameters to strings, and then
attempts to use a blank string for false.

Example of Failure:
pg_query_params('insert into table1 (bool_column) values
($1)', array(false));

Works:
pg_query_params('insert into lookup_permissions (system)
values ($1)', array(false ? 't' : 'f'));
----
Server IP: 64.71.164.2
Probable Submitter: 216.145.226.130
----
Manual Page -- http://www.php.net/manual/en/function.pg-query-params.p
hp
Edit        -- https://master
.php.net/note/edit/78072
Del: integrated  -- h
ttps://master.php.net/note/delete/78072/integrated
Del: useless     -- http
s://master.php.net/note/delete/78072/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78072/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78072/spam
Del: non-english -- 
https://master.php.net/note/delete/78072/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78072/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78072
Reject      -- https://mast
er.php.net/note/reject/78072
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )