View Single Post
  #3  
Old 29th December 2009, 15:42
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

Sorry that I have not seen this post earlier

Anyhow your former problem was based on the operator precedence: http://dev.mysql.com/doc/refman/5.0/...recedence.html

the same with 1+2*3 != (1+2)*3 -> 7 vs. 9

And don't forget about escaping and verifying the userinput before performing the queries (and normally the DB extracted input for further DB related operations as well)
Reply With Quote