Is there any difference between SQL running in code vs the MySQL command line?

Posted by MJB on Stack Overflow See other posts from Stack Overflow or by MJB
Published on 2010-04-08T16:54:10Z Indexed on 2010/04/08 17:03 UTC
Read the original article Hit count: 171

Filed under:
|
|

I have a SQL update statement I am running from inside a PHP program. It is prepared and then executed. When I run it in PHP, it reports a constraint violation. When I run the exact same statement from the command line (which I am getting via dBug()), it works with no errors. This sounds impossible, so I keep looking for differences between the statements. The only thing I can see is that when I execute it with an array of arguments, they all appear to be chars, when some should be integers.

Any suggestions for where to look? I can post the code, but that does not seem like it would be helpful, because the code works.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about debugging