List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:August 3 1999 4:09pm
Subject:Re: Sorting
View as plain text  
Jody wrote:
> 
> I would like to sort the results by item name ($IN) what would I do to do that?
> 
> this is the PHP page im using....
> 
> mysql_connect("$DBHost","$DBUser","$DBPass");
> @mysql_select_db( "endura" );
> $result=mysql_query("SELECT * FROM Items WHERE Category='$CA'");
> 
> echo "Select an item:<br><br>";
> echo "<ul>";
> 
> while ($row  =  mysql_fetch_row($result)) {
> $II=$row[0];
> $IN=$row[1];
> $ID=$row[2];
> $IC=$row[3];
> $Ca=$row[4];
> 
> echo "$II - <a href='./description.php3?II=$II'>$IN</a> -
> $ID<br>";
>         }
> echo "</ul>";
> 
> I want these links sorted from A - Z....
> 
> echo "$II - <a href='./description.php3?II=$II'>$IN</a> -
> $ID<br>";
> 
> any help would be appreciated
> 
> 
> Regards,
> 
> W. J. Samplonius

Hi Jody

Just use:
"SELECT * FROM Items WHERE Category='$CA' ORDER BY In"

Tschau
Christian

Thread
SortingJody3 Aug
  • Re: SortingChristian Mack3 Aug