Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql query to search for a string in all columns

SELECT * FROM `yourtable` WHERE `val` IN (`field1`, `field2`, `field3`, `field4`)
--Or
SELECT * FROM `yourtable` WHERE `field1` LIKE `%val%` or `field2` LIKE `%val%` etc....
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #query #search #string #columns
ADD COMMENT
Topic
Name
9+1 =