-
k.. How would i go around choosing a particular "collum" in MySql and all the vaules listed in are sorted alpabeticaly
lets say I have
ID | Name | Somevalue |
1 | apple | b
2 | zebra | q
3 | bananna | 21
pretty crude table huh? 
lets say i want the values rearanged so its
1 apple b
3 bananna 21
2 zebra q
I want the name collum to be sorted alphabeticly
Whats the advice oh great php gods! 
(or at least point me in the right direction)
thanx
-
SitePoint Enthusiast
During your SQL query use ORDER BY fieldname, here's a nice little tutorial on ORDER BY :
http://linux.oreillynet.com/pub/a/li.../aboutSQL.html
-
$sql = mysql_query ("SELECT * FROM $table ORDER BY Name");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks