Trying to figure out the right way to query a MySql database and find a user defined variable from a Textbox.Text property. I’m not sure what to put for the where clause in order to search every cell of every row for a match. I have looked at coalesce and contains, but neither are really making sense to me and I’m not sure if they are my best option. I’m thinking that the query string will look something like this:
SELECT * FROM table WHERE (I dont know) = '" & searchBarTextVariable & "'
Without a dynamic solution you will have to specify each column you’d like to search. This is a pretty fundamental part of working with a relational database; MySQL is no exception.
As mentioned in a @jadarnel27’s comment, you should use parameters instead. Something like: