--- Tedit kap <[EMAIL PROTECTED]> wrote: > I have a table like > > articleid-articledate-articletitle-articlebody > > I am looking for a simple php script that will search my database which > contains articles against keywords entered by the user...So, it should bring > up that article that contains that keyword or words entered by the user. > > For example: > select * from the_table where articletitle or articlebody contains keyword > > of course this is wrong syntax I guess but I just wrote this to explain what > I want: search a certain keyword in article text body and bring the > results.... > > What is the correct syntax? I could not see a "contains" or something like > that when I searched....
SELECT * FROM the_table WHERE articletitle LIKE '%keyword%' OR articlebody LIKE '%keyword%'; James
