php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38472 PDO bindParam
Submitted: 2006-08-16 14:43 UTC Modified: 2006-08-24 01:00 UTC
From: chicodicherry at hotmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.1.4 OS: Windows XP Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chicodicherry at hotmail dot com
New email:
PHP Version: OS:

 

 [2006-08-16 14:43 UTC] chicodicherry at hotmail dot com
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;
	}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-16 14:53 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2006-08-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 17:01:29 2024 UTC