note 89370 added to pdostatement.bindparam

From: Date: Wed, 04 Mar 2009 22:04:04 +0000
Subject: note 89370 added to pdostatement.bindparam
Groups: php.notes 
Request: Send a blank email to php-notes+get-151489@lists.php.net to get a copy of this message
@chance garcia The point of bindParam is "Unlike PDOStatement::bindValue(), the variable is bound as a reference and will only be evaluated at the time that PDOStatement::execute() is called. " The point of bindParam is to be able to loop over data executing a query without the need to set the bound parameters(values) each time in the loop. You are describing bindValue. The issue is the pass by reference does not work with arrays in bindParam. Or atleast I haven't been able to get it to work and still evaluate only at the time execute is called. ---- Server IP: 208.69.120.35 Probable Submitter: 63.73.199.69 ---- Manual Page -- http://www.php.net/manual/en/pdostatement.bindparam.php Edit -- https://master.php.net/note/edit/89370 Del: integrated -- https://master.php.net/note/delete/89370/integrated Del: useless -- https://master.php.net/note/delete/89370/useless Del: bad code -- https://master.php.net/note/delete/89370/bad+code Del: spam -- https://master.php.net/note/delete/89370/spam Del: non-english -- https://master.php.net/note/delete/89370/non-english Del: in docs -- https://master.php.net/note/delete/89370/in+docs Del: other reasons-- https://master.php.net/note/delete/89370 Reject -- https://master.php.net/note/reject/89370 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151489) next »