How to select rows from a table where a word appears? (MySQL + PHP) -
i have make search keywords part of computer science work.
i have names , descriptions of several dvd's.
the user has search word, , displayed names of dvd's word appeared in either title or description.
let's columns in table "dvd title" , "description", , word person has entered $keyword.
how select rows in mysql $keyword appears @ least once in either columns "dvd title" , "description".
thanks reading. appreciated.
you create full text index on columns, isn't want do.
you need wildcards, , wildcards compare keyword instead of =. wildcard in mysql %
select * mutable dvdtitle '%keyword%' or description '%keyword%';
as using php variable , creating string, you've got of own homework.
Comments
Post a Comment