SOLVED-Problem in sql syntax!
Moderator: General Moderators
SOLVED-Problem in sql syntax!
From the first view this should work well:...
Sorry,but when i try to upload the entire text i get a 500 Internal server error page!!!
A forum administrator should contact me please!
I uploaded my initial text for this post here: http://students.cs.unipi.gr/~p01109/imo/post.txt
Sorry,but when i try to upload the entire text i get a 500 Internal server error page!!!
A forum administrator should contact me please!
I uploaded my initial text for this post here: http://students.cs.unipi.gr/~p01109/imo/post.txt
Last edited by dimitris on Tue Oct 19, 2004 11:51 am, edited 1 time in total.
Have you tried...
Have you tried dumping this md5($subject) into a variable first ....
$variable = md5($subject) and the insert $variable instead of ".'md5($subject)'."
Just a suggestion. Otherwise I can't really see anything wrong. Although I admit I'm some what of a n00b.
$variable = md5($subject) and the insert $variable instead of ".'md5($subject)'."
Just a suggestion. Otherwise I can't really see anything wrong. Although I admit I'm some what of a n00b.
Re: Have you tried...
I tried it too!neophyte wrote:Have you tried dumping this md5($subject) into a variable first ....
$variable = md5($subject) and the insert $variable instead of ".'md5($subject)'."
Just a suggestion. Otherwise I can't really see anything wrong. Although I admit I'm some what of a n00b.
$hash_code=md5($subject) and then inserting this variable in the actual script
Re: Problem in sql syntax!
Sorry,but when i try to upload the entire text i get a 500 Internal server error page still happens!!!
A forum administrator should contact me please or fix this bug please!
I UPDATED my initial text for this post here: http://students.cs.unipi.gr/~p01109/imo/post.txt
A forum administrator should contact me please or fix this bug please!
I UPDATED my initial text for this post here: http://students.cs.unipi.gr/~p01109/imo/post.txt
'from' and 'to' are reserved keywords in SQL. To use them as field names you need to quote them with backticks (`):
Code: Select all
select `from`, `to` from some_table...
Last edited by Weirdan on Tue Oct 19, 2004 10:41 am, edited 1 time in total.
Re: Problem in sql syntax!
We're aware of this bug but have found no way to circumvent it yet.dimitris wrote:Sorry,but when i try to upload the entire text i get a 500 Internal server error page still happens!!!
Thanks a lot, i was looking again to my code when i remembered that i had a similar problem using group field in a sql syntax.... I thought " Hey we write SELECT * FROM some_table. From is keyword!"Weirdan wrote:'from' is reserved keyword in SQL. To use it as field name you need to quote it with backticks (`):Code: Select all
select `from` from some_table...
Re: Problem in sql syntax!
Do you think that it is a problem with interpreting php tags? In that case we should avoid using php bbcode option!
Ok! Don't mind! Problems are always possible to happen! Thanks for your time Weirdan!Weirdan wrote:no. Seems like our hosting provider got some anti-SQL-injection protection installed which gets triggered when you try to post certain SQL queries. We did plan to communicate to IMHosted regarding that, but I don't know if it was done though.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
here's a massive tip for anyone getting internal server errors:
avoid having INSERT and INTO in a continuous string. That's the one we've found so far that will break a posting. As long as INSERT and INTO (case is irrelevant) are seperated by more than whitespace, it works fine.
Additionally, DELETE and FROM are also hot.
avoid having INSERT and INTO in a continuous string. That's the one we've found so far that will break a posting. As long as INSERT and INTO (case is irrelevant) are seperated by more than whitespace, it works fine.
Additionally, DELETE and FROM are also hot.