tags:

views:

29

answers:

2

In mysql table name (user_login) and i having field like login_name and password . I entered in login_name as abc and password as \/'(Special symbols like \ / ') .And my query is

select password from user_login where password like '\/'' and I got sql syntax error

+6  A: 

You should use parameterised queries in what ever language you are implementing the call in. Beware SQL Injection attack

Dead account
provide any examples
vsr
You don't specify which programming language you are using. Also, check the link there, it includes examples in several languages.
Dead account
+1  A: 

hi you should use parameters instead of putting varibles directly into the query. i think it's aproblem with the escaping symbol.

check out this link http://stackoverflow.com/questions/1294974/how-to-set-query-parameters-in-mysql-query-browser

nWorx