Jump to content

Simple SQL Question


TennesseeGuy

Recommended Posts

[!--quoteo(post=362749:date=Apr 8 2006, 03:13 AM:name=TennesseeGuy)--][div class=\'quotetop\']QUOTE(TennesseeGuy @ Apr 8 2006, 03:13 AM) [snapback]362749[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is it possible to query your results, list them in ascending order but excluding one from the ascending order that neds to be added to the end? ie ordered after query: A,B,C,D,E,G,H,I,J,K,F
[/quote]

$query="SELECT * FROM $table ORDER BY $fieldheader";
mysql_query($query);

that will arrange the data by field type. As far as placing only one at the end you would have to probably add a WHERE statement and have it list all except the one you wanted placed last. Then have it list the last one afterwards with another WHERE statement.

Link to comment
https://forums.phpfreaks.com/topic/6866-simple-sql-question/#findComment-25118
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.