PDO ERROR (PDO::prepare(): SQLSTATE[00000]: No error: PDO constructor was not called)

1,102 views
Skip to first unread message

Justin Giesbrecht

unread,
Nov 28, 2013, 7:22:59 PM11/28/13
to f3-fra...@googlegroups.com
Hello, wondering if anyone can help solve what is going on here.....

I keep getting this error, I don't have any understanding why. I had all of this working on my test server, I move it to my live server and now i'm getting all of these errors...


PDO::prepare(): SQLSTATE[00000]: No error: PDO constructor was not called

This is the line that is calling the DB
$saved = $db->exec(
'SELECT * FROM saved WHERE UserId=?',
$userId
);

Any help would be greatly appreciated!!

Samrat Rai

unread,
Nov 29, 2013, 1:45:05 AM11/29/13
to f3-fra...@googlegroups.com
try this:

$saved = $db->exec(
                   'SELECT * FROM saved WHERE UserId=?',
                    array(1 => $userId)
);
Reply all
Reply to author
Forward
0 new messages