how to sort a query with SQL command
#1
Banned
Thread Starter
Join Date: Aug 2001
Posts: 2,322
Likes: 0
Received 0 Likes
on
0 Posts
how to sort a query with SQL command
i need to sort PCnames in one of my querys from my database, and the name's look like this:
TalkTech1
TalkTech2
...
TalkTech30
i had this:
the problem is, this is doing it correctly based on the command, but its not i want.
this is giving me:
TalkTech1
TalkTech10
TalkTech11
etc etc
I want it to go from TalkTech1--TalkTech30
is there any obvious way to do this?
(maybe i need to make two fields in the table?
TalkTech1
TalkTech2
...
TalkTech30
i had this:
PHP Code:
sql="SELECT Distinct * FROM PClist ORDER BY PCnames"
the problem is, this is doing it correctly based on the command, but its not i want.
this is giving me:
TalkTech1
TalkTech10
TalkTech11
etc etc
I want it to go from TalkTech1--TalkTech30
is there any obvious way to do this?
(maybe i need to make two fields in the table?
#3
Banned
Thread Starter
Join Date: Aug 2001
Posts: 2,322
Likes: 0
Received 0 Likes
on
0 Posts
i know, i thought of that, but it might mislead the person who reads the result as the actual pc name is TALKTECH1 not TALKTECH01.....
oh well, its not that big of a deal. i gave each pcname a unique PCid, i can sort by that for now.
oh well, its not that big of a deal. i gave each pcname a unique PCid, i can sort by that for now.