Forum Moderators: open

Message Too Old, No Replies

$variable

         

juniorelnino

2:35 am on Nov 17, 2005 (gmt 0)

10+ Year Member



$query = "SELECT area_code, location, rates FROM t_rate where location like "$countryHead%"";

The $countryHead is suppose to be an alphabet where the user click.

My initial statement was
$query = "SELECT area_code, location, rates FROM t_rate where location like "I%"";

My question is how do I subsitute all the alphabets into $countryHead. For example, when a User click on the alphabet "A', the $countryHead will be "A%"

mukhtar2t

4:29 am on Nov 17, 2005 (gmt 0)

10+ Year Member



peace be upon you.

> $query = "SELECT area_code, location, rates FROM t_rate where location like "$countryHead%"";

you can write this instead
$query = "SELECT area_code, location, rates FROM t_rate where location like ".$countryHead."%";

juniorelnino

5:05 pm on Nov 17, 2005 (gmt 0)

10+ Year Member



Thanks for the help. Im relatively new to php and SQL.

mukhtar2t

11:17 am on Nov 18, 2005 (gmt 0)

10+ Year Member



no need for thanks we hope our god give us a good for any help that is Mohammed "Sala allah alih wasalam" said.