1

I'm creating a SQL query with PDO in PHP. Unfortunately, there seems to be an error in my query. I've tried $query->errorInfo(), but that only gives me a little bit of the error message ("There is an error in your syntax near...").

How can I display the entire query that PDO is passing to my database?

TIA.

benjy
  • 4,664
  • 7
  • 38
  • 43

1 Answers1

3

You can't really. This has been discussed here before, see this:

Getting raw SQL query string from PDO prepared statements

Community
  • 1
  • 1
karim79
  • 339,989
  • 67
  • 413
  • 406
  • Thanks for showing me that - one of the comments had the answer. Sorry - thought I had searched hard enough, guess not. Much appreciated. – benjy Jun 26 '09 at 03:26