Forum Moderators: coopster
my method in searching in the database is...
$keyword = 'test';
$result = mysql_query("SELECT * FROM items WHERE item_description LIKE '%" . $keyword . "%' OR item_name LIKE '%" . $keyword . "%'");
now, my problem is, how to count that matches on that rows in the database...
i mean, how many words that matches on every single row from the database.
lets say under the query above in description field:
ROW 1: "test odasp doapid test ados oidaps odas"
ROW 2: "odasp doapid test ados oidaps odas"
ROW 3: "test tes test odasp doapid test ados oidaps odas"
so the result must be in row 1 = 2, row 2 = 1 and row 3 = 4