note 95242 deleted from pdostatement.bindparam by danbrown

From: Date: Mon, 21 Dec 2009 17:00:13 +0000
Subject: note 95242 deleted from pdostatement.bindparam by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164186@lists.php.net to get a copy of this message
Note Submitter: obsidianproject.co.uk ---- binding array indexes to statements doesn't work as expected. I.e. <?php $arr=array("a","b"); $stm=$db->prepare("INSERT INTO foo VALUES (?,?)"); $stm->bindParam(1,$arr[0]) $stm->bindParam(2,$arr[1]); $stm->execute(); $arr=array("c","d"); $stm->execute(); ?> Instead of two rows with values a,b and c,d in the database you will have two rows of a,b.

« previous php.notes (#164186) next »