tags:

views:

21

answers:

1

I'm troubleshooting a prepared statement but I'm getting nowhere. I think this is because PDO is not generating an error.

I've called:

$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);

And am trying to get it to insert as follows:

$stmt = $db->prepare23423("INSERT INTO ".DB_TABLE_PREFIX."quote (email,reference,started) VALUES (:email,:reference,:started)");

As you can see, I've added some random characters to the function name to try and get it to spit out an error (at the very least it should tell me that the function doesn't exist?) but it won't. Why is that?

+1  A: 

You wouldn't expect a PDO error from this: you'd expect a PHP error... so what are your PHP error settings?

Mark Baker
I'd expect an error of some description yes. PHP error reporting is set to E_ALL.
bcmcfc
ini_set('display_errors', '1'); ??
Mark Baker
...or keeping an eye on the error.log file.
VolkerK