|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-16 14:53 UTC] tony2001@php.net
[2006-08-24 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 21:00:01 2025 UTC |
Description: ------------ Pdo do not bindParam?s if bindParams is used and after that execute returns false for any cases?!? Reproduce code: --------------- public function getAll($amount = null, $offset = null) { $limit = null; if ($amount !== null) { $limit = "LIMIT ".(int)$amount; if ($offset !== null) { $limit = "LIMIT ".(int)$offset.", ".(int)$amount; } } $stmt = $this->prepare("SELECT * FROM contents :LIMIT"); $stmt->bindParam(':LIMIT' => $limit); $stmt->execute(); $ret = array(); while($row = $stmt->fetchObject('some class')) { $ret[] = $row; } return $ret; }