I'm trying to make a simple search bar that searches through my database for certain words. It is possible to use the LIKE attribute without using WHERE? I want it to search all columns for the keywords, not just one. Currently I have this:
mysql_query("SELECT * FROM shoutbox WHERE name LIKE '%$search%' ")
Which obviously only searches for names with the search input. I tried both of these:
mysql_query("SELECT * FROM shoutbox LIKE '%$search%' ")
mysql_query("SELECT * FROM shoutbox WHERE * LIKE '%$search%' ")
and neither worked. Is this something that is possible or is there another way to go about it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…