•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 375,215 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,313 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 299 | Replies: 3 | Solved
![]() |
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near."
Now this is a really stupid error. (yes that sums up the error S T U P I D)
I am making an update to columns via stored variables.
Eg.
Note: This goes on for at least 10 columns not 5 like I have here
Now as im tryign to debug the error I cut out the C/D variables and it works! (It also works if I just change $c/$d to 0/0)
Anyways this is utterly stupid and dont know why this is happening...
I have been on this for days and days and refused to show anyone this stupid error for fear oh my own stupidity but oh well
Anyways any help?
Thanks, Regards X
Now this is a really stupid error. (yes that sums up the error S T U P I D)
I am making an update to columns via stored variables.
Eg.
"UPDATE table SET a = a + $a, b = b + $b, c = c + $c, d = d + $d, e = e + $e"
Note: This goes on for at least 10 columns not 5 like I have here
Now as im tryign to debug the error I cut out the C/D variables and it works! (It also works if I just change $c/$d to 0/0)
Anyways this is utterly stupid and dont know why this is happening...
I have been on this for days and days and refused to show anyone this stupid error for fear oh my own stupidity but oh well

Anyways any help?
Thanks, Regards X
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,057
Reputation:
Rep Power: 8
Solved Threads: 229
Field Type Collation Attributes Null Default Extra Action
a int(2) Yes 0
they all have the same structure, thats copied and pasted straight from phpMyAdmin.
But like I said I dont understand why they work on one column and not the other.
Ill test the missing values theory, but I very much doubt that is the problem as if there was no value in $a/b there would be no error.
Solved!
See the missing values theory was wrong, but it lead me to go test the variables throughly and i solved it. Thanks!
In short said the variable had the wrong value (which it did not but anyways...) so I gave them all a default value of 0 at the start and override them with the real value and its working for the time being!
a int(2) Yes 0
they all have the same structure, thats copied and pasted straight from phpMyAdmin.
But like I said I dont understand why they work on one column and not the other.
Ill test the missing values theory, but I very much doubt that is the problem as if there was no value in $a/b there would be no error.
Solved!
See the missing values theory was wrong, but it lead me to go test the variables throughly and i solved it. Thanks!
In short said the variable had the wrong value (which it did not but anyways...) so I gave them all a default value of 0 at the start and override them with the real value and its working for the time being!
Last edited by OmniX : May 16th, 2008 at 9:12 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
Similar Threads
- Error when loading a game (Windows NT / 2000 / XP / 2003)
- Keep getting stupid ERROR messages (Windows NT / 2000 / XP / 2003)
- Some stupid error i cant fix, PLEASE HELP (Java)
- Front Page error when opening .HTM file (HTML and CSS)
- internet explorer error messages (Web Browsers)
- struct error (!?) (C)
- im stupid (Windows NT / 2000 / XP / 2003)
- HELP (*nix Software)
Other Threads in the MySQL Forum
- Previous Thread: Export and Import of database errors, please advise.
- Next Thread: PHP in MySQL Trigger



Linear Mode