Jump to content


Photo

WHERE problems


  • Please log in to reply
1 reply to this topic

#1 Tisten

Tisten
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 16 May 2003 - 01:52 PM

$query_getplayer = \"SELECT X, Y, Name, Score, Resources FROM player WHERE Name= ;

i tried almost everything

what i want is a var $findplayer to be placed there automaticly and the sign before and after don\'t matter.
example : $findplayer = \"Appel\";

it has to select everything with \"apple\" in it like

jdksfhapplenjfkds
fdappledf
and of course apple

how do i do this ????

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 16 May 2003 - 03:20 PM

Read more about LIKE in mysql

$query_getplayer = "SELECT X, Y, Name, Score, Resources FROM player WHERE Name LIKE \'%apple%\';

Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users