#38472 [NEW]: PDO bindParam
| From: | chicodicherry at hotmail dot com | Date: | Wed, 16 Aug 2006 14:43:40 +0000 |
| Subject: | #38472 [NEW]: PDO bindParam | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-100864@lists.php.net to get a copy of this message | ||
From: chicodicherry at hotmail dot com
Operating system: Windows XP Pro
PHP version: 5.1.4
PHP Bug Type: PDO related
Bug description: PDO bindParam
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;
}
--
Edit bug report at http://bugs.php.net/?id=38472&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38472&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38472&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38472&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38472&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38472&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38472&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38472&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38472&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38472&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38472&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38472&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38472&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38472&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38472&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38472&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38472&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38472&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38472&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38472&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38472&r=mysqlcfg