Forum Moderators: coopster

Message Too Old, No Replies

MySQL Query

         

ocram

1:17 pm on Oct 19, 2004 (gmt 0)

10+ Year Member



Is it possible to find results from a MySQL table where the search string is stored within the table, eg searching for a string within a URL where the string is in the MySQL table

Cook

3:17 pm on Oct 19, 2004 (gmt 0)

10+ Year Member



Not sure I understand the question. Are you looking for something like

SELECT * FROM `table` WHERE `field` LIKE '%search%'

that gives you all rows where `field` contains 'search'?

Or is 'search' (the search string) meant to be itself coming from the DB. In that case you'd need to do a query to retrieve the search string first, then apply it to a second query like the one above.

Or have I really not understood your question?

Cheers,
Cook