ccrevcypsys Posted February 8, 2008 Share Posted February 8, 2008 I have a filter system that i am builiding and i am putting in an alphabet drill down. So when they click on a it gives all those entries with an a. I have a problem tho. I dont know how to make the where statement... This is what i got so far but when i do it ( logically ) it will pull up all of the names that have an a in them. I just want it to search for the first letter... if($_GET['al']){ $where= "WHERE FullName LIKE '%".$_GET['al']."%'"; } And here is one of my links <a href="newEdit.php?i=<?php echo $_GET['i']; if($_GET['Str']==TRUE && $_GET['w']==TRUE){ ?> &Str=<?php echo $_GET['Str'];?>&w=<?php echo $_GET['w']; } if($_GET['arg']==TRUE){ echo "&arg=".$_GET['arg']; } ?> &al=a&d=<?php if($_GET['arg']=="Im" && $_GET['d']=="asc"){echo "desc"; }else if($_GET['arg']=="Im" && $_GET['d']=="desc"){ echo "asc"; }else{ echo "asc"; } ?>"> A </a>| Quote Link to comment https://forums.phpfreaks.com/topic/90106-solved-n00b-question/ Share on other sites More sharing options...
revraz Posted February 8, 2008 Share Posted February 8, 2008 Remove the leading % so it's just a% Quote Link to comment https://forums.phpfreaks.com/topic/90106-solved-n00b-question/#findComment-462006 Share on other sites More sharing options...
ccrevcypsys Posted February 8, 2008 Author Share Posted February 8, 2008 Nice thanks! Quote Link to comment https://forums.phpfreaks.com/topic/90106-solved-n00b-question/#findComment-462009 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.