note 90973 added to pdo.prepare

From: Date: Tue, 19 May 2009 08:12:19 +0000
Subject: note 90973 added to pdo.prepare
Groups: php.notes 
Request: Send a blank email to php-notes+get-155715@lists.php.net to get a copy of this message
Hello, I am having a very strange problem: <?PHP $query['domains'][1] = $dbh->prepare("SELECT domain FROM domains WHERE (domain = :domainname) LIMIT 1"); $query['domains'][1]->bindParam(':domainname', $domain, PDO::PARAM_STR, 133); $query['domains'][1]->execute(); ?> When I remove the bindParam I am still getting results out of the query, what can't be possible. Also when I give anothere (fault) value with the bindparam, I am still getting results.... It looks like that the whole WHERE statement is being ignored... any suggestions would be welcome! ---- Server IP: 91.199.167.18 Probable Submitter: 94.209.49.163 ---- Manual Page -- http://www.php.net/manual/en/pdo.prepare.php Edit -- https://master.php.net/note/edit/90973 Del: integrated -- https://master.php.net/note/delete/90973/integrated Del: useless -- https://master.php.net/note/delete/90973/useless Del: bad code -- https://master.php.net/note/delete/90973/bad+code Del: spam -- https://master.php.net/note/delete/90973/spam Del: non-english -- https://master.php.net/note/delete/90973/non-english Del: in docs -- https://master.php.net/note/delete/90973/in+docs Del: other reasons-- https://master.php.net/note/delete/90973 Reject -- https://master.php.net/note/reject/90973 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#155715) next »