Jump to content

[SOLVED] N00b question


ccrevcypsys

Recommended Posts

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>|

Link to comment
https://forums.phpfreaks.com/topic/90106-solved-n00b-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.