Author Topic: WHERE problems  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

Offline TistenTopic starter

  • Irregular
  • Posts: 5
    • View Profile
WHERE problems
« on: May 16, 2003, 09:52:15 AM »
$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 ????                    

Offline shivabharat

  • Addict
  • Posts: 2,404
    • View Profile
WHERE problems
« Reply #1 on: May 16, 2003, 11:20:13 AM »
Read more about LIKE in mysql

Code: [Select]
$query_getplayer = "SELECT X, Y, Name, Score, Resources FROM player WHERE Name LIKE \'%apple%\';                    
Knowledge --- Reading Enriches Mind But Sharing Enhances It.Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks