note 83425 added to mysqli-stmt.bind-param

From: Date: Sun, 25 May 2008 18:34:45 +0000
Subject: note 83425 added to mysqli-stmt.bind-param
Groups: php.notes 
Request: Send a blank email to php-notes+get-139751@lists.php.net to get a copy of this message
don't try to bin twice the same variable, as it won't work. $query = "select * from table where col1 = ? or col2 = ?"; mysqli_bind_param($stmt, "ss", $arg, $arg); You have to use a another variable : $query = "select * from table where col1 = ? or col2 = ?"; $arg2 = $arg; mysqli_bind_param($stmt, "ss", $arg, $arg2); ---- Server IP: 216.235.15.211 Probable Submitter: 70.82.51.98 ---- Manual Page -- http://www.php.net/manual/en/mysqli-stmt.bind-param.php Edit -- https://master.php.net/note/edit/83425 Del: integrated -- https://master.php.net/note/delete/83425/integrated Del: useless -- https://master.php.net/note/delete/83425/useless Del: bad code -- https://master.php.net/note/delete/83425/bad+code Del: spam -- https://master.php.net/note/delete/83425/spam Del: non-english -- https://master.php.net/note/delete/83425/non-english Del: in docs -- https://master.php.net/note/delete/83425/in+docs Del: other reasons-- https://master.php.net/note/delete/83425 Reject -- https://master.php.net/note/reject/83425 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139751) next »