Jump to content

Archived

This topic is now archived and is closed to further replies.

id123

searching a mysql database

Recommended Posts

hi,

is there a function in mysql where the search string is used to find anything containing it. eg if you searched \"american\" then on a film datbase you would get american pie1, american pie2, american wedding, american werewolf in london etc etc

 

so far i have tried select * from dvd where title = $title

 

 

hope that makes sense coz it kind of dont 2 me!!!!!

thanks

Share this post


Link to post
Share on other sites

SELECT * FROM DVD WHERE title IS LIKE \'*$title*\'

 

or something similar.. it something with wildcards..

Share this post


Link to post
Share on other sites
SELECT * FROM DVD WHERE title IS LIKE \'*$title*\'

 

or something similar.. it something with wildcards..

$result = mysql_query(\"SELECT * FROM dvd WHERE title LIKE \'%title%\'\");

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.