ID:               38472
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chicodicherry at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         PDO related
 Operating System: Windows XP Pro
 PHP Version:      5.1.4
 New Comment:

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.





Previous Comments:
------------------------------------------------------------------------

[2006-08-16 14:43:40] 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;
        }



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38472&edit=1

Reply via email to