I\'m trying to search a whole table in mySQL for a string.
I want to search all fields and all entrees of a table, returning each full entry that contains the speci
If you're using Sublime, you can easily generate hundreds or thousands of lines using Text Pastry in conjunction with multiple line selection and Emmet.
So in my case I set the document type to html, then typed div*249
, hit tab and Emmet creates 249 empty divs. Then using multiple selection I typed col_id_
in each one and triggered Text Pastry to insert an incremental id number. Then with multiple selection again you can delete the div
markup and replace it with the MySQL syntax.
for specific requirement the following will work for search:
select * from table_name where (column_name1='%var1%' or column_name2='var2' or column_name='%var3%') and column_name='var';
if you want to query for searching data from the database this will work perfectly.