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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.