simple INSERT statement with placeholders failing. I don't understand why.

From: Date: Mon, 13 Jul 2009 23:58:39 +0000
Subject: simple INSERT statement with placeholders failing. I don't understand why.
Groups: php.db 
Request: Send a blank email to php-db+get-46296@lists.php.net to get a copy of this message
this: $q=mysqli_query($db_billing,'INSERT INTO billing (clientFname, clientLname) VALUES (?,?)', array($defaultsFormVars[clientFname], $defaultsFormVars[clientLname])); is giving Warning: mysqli::query() expects parameter 2 to be long, array given in /home/meee/public_html/somedir/test.php on line 71 a "long"?! We need values for 2 text/BLOB columns.. an array seems appropriate to me. It was with PEAR DB. WHy is it asking for a long? it was working fine with PEAR DB before I turned that off to try and learn better what was under PEAR. I found http://dev.mysql.com/doc/refman/5.1/en/insert.html but there is no example of using placeholders there, so I can't determine how to alter this example (which I learned from a book that just breezes through with only the one quick PEAR DB example.) If someone can even just point me to the right docs for this, I'd be grateful. thanks! -G

« previous php.db (#46296) next »