So this is what we know:
1. The query is valid and does not have any syntax errors.
2. The query works when tested from CLI
3. The query is being sent to the MySQL server
4. No errors are being returned
5. If the query is broken intentionally, an error IS being returned.
So let's assume that the query is working, but the updated record is not being reflected in the database. How could that happen? Have you checked mysql_affected_rows by chance? Not sure if you mentioned that already now that I am typing this out.
PHP lying to me about results
Moderator: General Moderators
Re: PHP lying to me about results
Nopepytrin wrote:... maybe Vlad has an idea
But I would consider this PHP side problem, not DB side... It looks like this...
You may try creating a clean file, write (no copy-pasting) the function and use this file instead.
PS: You don't have a call to stored procedure before this query, do you?
There are 10 types of people in this world, those who understand binary and those who don't
Re: PHP lying to me about results
Nope - no stored procedures period.
I'll try re-writing the function - see if that fixes anything.
I'll try re-writing the function - see if that fixes anything.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: PHP lying to me about results
Not that I see this being a problem, but try changing the code for the query to this:
Code: Select all
$query = "UPDATE
`response`
SET
`number` = '$number'
WHERE
`response_id` = '{$this->response_id}'";
Re: PHP lying to me about results
Did you ever figure out what the problem was pickle?
Re: PHP lying to me about results
No. I was going to finish off this thread today, but you responded before I got a chance 
I have a limited number of hours paid for to work on this project & this little bug has taken 5 hours so far. The client has decided to remove the feature that was surrounding this bug, and move on to other things.
Bugs the hell out of me that I have absolutely no clue... but it's not my money.
Thanks for all the help everyone - it's at least a little re-assuring that the greatest minds the Internet has to offer is are just as stumped as I.
I have a limited number of hours paid for to work on this project & this little bug has taken 5 hours so far. The client has decided to remove the feature that was surrounding this bug, and move on to other things.
Bugs the hell out of me that I have absolutely no clue... but it's not my money.
Thanks for all the help everyone - it's at least a little re-assuring that the greatest minds the Internet has to offer is are just as stumped as I.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: PHP lying to me about results
pickle wrote:Thanks for all the help everyone - it's at least a little re-assuring that the greatest minds the Internet has to offer is are just as stumped as I.
There are 10 types of people in this world, those who understand binary and those who don't