Jump to content


Photo

searching a mysql database


  • Please log in to reply
2 replies to this topic

#1 id123

id123
  • Members
  • Pip
  • Newbie
  • 3 posts

Posted 10 December 2003 - 05:39 PM

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

#2 Goochi

Goochi
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationBelgium

Posted 10 December 2003 - 05:41 PM

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

or something similar.. it something with wildcards..
-xxx-

#3 Deadmeat

Deadmeat
  • Members
  • PipPip
  • Member
  • 20 posts
  • Locationva

Posted 10 December 2003 - 07:49 PM

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%\'\");
Free Photoshop Tutorials[br]TutorialMan.com[br]---------------------------[br]Need Webspace thats cheap and reliable?[br]Quik-Online.org




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users