hi,
I'm actually building a small search engine based on the LIKE funktion of MySQL. That means my query looks so :

SELECT * FROM articles WHERE content LIKE('%".$squery."%')

Works perfectly, but now its nessesary for me to add more than one field to look in, that means something like that :

SELECT * FROM articles WHERE content OR details OR time LIKE('%".$squery."%')

But this query only returns all entrys that match the last given fielt (in this case 'time'). Did i something wrong or is the only possible whay to handle such thing working with indexes ?

    Take a look at FULLTEXT indexes in the MySQL manual

      I thougt so.

      Thanks anyway 🙁

      P.S.: Is it realy the only way or is there maybe an other method to place more than one field in a query with LIKE ?

        You could try

        SELECT * FROM articles WHERE (content LIKE ('%".$squery."%') ) OR (details LIKE('%".$squery."%') ) OR (time LIKE('%".$squery."%') )

          Write a Reply...