Wednesday, 15 July 2015

mysql - Sql Query LIKE not working -



mysql - Sql Query LIKE not working -

hi have trying query, receives value on querystring, not working think query self no good. help me?

so receive query on

<%string detalhe = request.getparameter("value");%>

i wont set connections , stuff, because work other querys, problem not connections.

// sql query retrieve values specified table. string querystring = "select * ebooko.dadoslivros autor '%"+detalhe+"%' or ano '%"+detalhe+"%'";; rs = statement.executequery(querystring);

it cannot retrive value, i'm querying.

adicional info: table: dadoslivros columns need compare value: autor, ano.

for illustration when run href value passed is: jules%verne (i gess changes spaces '%'.

use urldecoder#decode() decode parameters in query string.

you should consider using preparedstatement prevent sql injection attacks.

mysql jsp jsp-tags

No comments:

Post a Comment