I am creating a query string where i like to sort the data by index character..
eg: clicking on a link [a] should list all the records starts with letter a... but can't get it working
$result=mysql_query("SELECT firstname, lastname, nickname,email,UNIX_TIMESTAMP(birthday),UNIX_TIMESTAMP(anny) FROM addressbook WHERE userid='$userid' AND substr(firstname,0,1)='$lower_char' or substr(firstname,0,1)='$up_char'");
What i am doing wrong???
please help