'LinKin Posted June 21, 2014 Share Posted June 21, 2014 Hello, When I am going to search the row(s) where a column matches this symbol: % MySQL returns me every row from the Database! But it doesn't return me the value of the column where I search for the matches. I'm using this code to make the searches: local theQuery = dbPoll(dbQuery(dbHandler, "SELECT * FROM `myTable` WHERE `myColumn` LIKE ?", "%"..theArg.."%"), -1) Note that the variable 'theArg' is the string that I'm looking matches for. So in this case it is '%' I've seen that % symbol has a special use in MySQL, however I don't understand what it really does. Link to comment
MIKI785 Posted June 21, 2014 Share Posted June 21, 2014 As far as i know it works like a wild card.. so if you search for b, it will return anything that contains b, so for example ab, abc, or bc.. Link to comment
'LinKin Posted June 21, 2014 Author Share Posted June 21, 2014 I see no other solution that not letting % character be input in the text to make the search. Thank you Link to comment
MIKI785 Posted June 21, 2014 Share Posted June 21, 2014 Yes, if you want to make exact match then don't put in any %. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now