List:General Discussion« Previous MessageNext Message »
From:Alex Behrens Date:December 8 2002 11:53pm
Subject:desc question
View as plain text  
hey all,

I have a quick question. I'm trying to display a list of players by their
name, number, position, and grade. Name, number, and position all display
properly. However, grade (which is sorted grade number) is backwards, since
12th grade is after 11, 10, etc. How can I make it so only one form
selection adds a DESC tag to the query, is this possible?

I'm using this code:

$fetch = mysql_query("SELECT * FROM players ORDER BY $var");

<select name='var' size='1' style='border-style: solid; border-color:
<option value='name'>Name</option>
<option value='position'>Position</option>
<option value='number'>Number</option>
<option value='grade_num'>Grade</option>

I want only the Grade option to use the desc option with the $fetch query.
can I do this?


-Alex "Big Al" Behrens
E-mail: bigal@stripped
Urgent E-mail: bigal-cell@stripped (Please be brief!)
Phone: 651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner of the 3D-Unlimited Network:
Send News:

desc questionAlex Behrens9 Dec