Hi there,
I have just begun an implementation of the PDO and have noticed an
unusual behaviour.
The following code is supplied as an example to illustrate this. The
main issue here is
that no error is thrown. There is no notice of failure at all for the
second fetch/execute which returns just an empty array.

thanks in advance

    $dbh = new PDO('mysql:dbname=myDatabase;host=localhost',
'myUserName', 'myPassWord');
    $sql = 'SELECT id  FROM my_table WHERE id > :id limit 0,10';
    $sql2 = 'SELECT id, title FROM my_other_table WHERE id > :id limit 0,10';
    $stmt1 = $dbh->prepare($sql);
    $stmt2 = $dbh->prepare($sql2);
    while($row = $stmt1->fetch()){
        $row = $stmt2->fetchAll();

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to