Hello all, I have made some mysql search! So for example I have this words in mytable: "Book", "Book for Children", "Books for Adults" When I search "Book" so I have all this sentances in results ("Book", "Book for Children", "Books for Adults") ... so if I search Book the result should be "Book" How to orginize it? I use this code: $raw_results = mysql_query("SELECT * FROM table WHERE (`row` LIKE '%".$query."%')") or die(mysql_error());
$raw_results = mysql_query("SELECT * FROM table WHERE (`row` = '".$query."')") or die(mysql_error());
I would take it another step and normalize capitalization: $raw_results = mysql_query("SELECT * FROM table WHERE LOWER(row) = '".strtolower($query)."'") or die(mysql_error()); Code (markup):