|
|
(Another) MySQL question
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
This might be simple.. or not.
Basically, I have a table with three columns.
The first column is 'INT NOT NULL AUTO_INCREMENT PRIMARY KEY'
The other two columns are both TEXT.
What's bothering me is that MySQL automatically orders the entries alphabetically by the text in the second column. I want it to order them using the numbers in the first column. How do I do this?
EDIT:
Um, I guess I was wrong. It's not doing that. I'm not sure what happened that one time...
(
Last edited by Jaey; Feb 4, 2004 at 08:58 PM.
)
|
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
let's say your 3 columns are id, foo, bar, then your query would be:
SELECT * FROM db_name ORDER BY id, foo, bar, ASC
try not to sue me if i've gotten the wrong end of the stick though, there's a good chap
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Philz mate! What the hell are you doing posting at 1 AM on a wednesday night/thursday morning? Please tell me your not currently in the UK - cos if you are then that's some serious dedication to these boards and/or you're unemployed. Or is the times shown not GMT?
Oh wait - I get it. This is a ruse so you have an alibi for going and nicking cars yeah? "Sorry - but look I couldn't have nicked all those stereos, I was posting to this board at the time". I know your game
BTW - what part of liverpool are you from? My girlfriend is from near there, so I'm a wee bit curious. And please say you support Everton
<edit>Oh, you're a student, right? Because then it would make more sense </edit>
|
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
i'm usually up until about 4-5am, at the moment. working on something heavy. back up at 8am. ugh. neither student, nor unemployed, so you lose
currently residing on the Wirral, which doesn't mean i support Tranmere, before you say owt. i don't really follow footie at all. where's yer berd from?
thread - hijacked
// transmitted by philzAutoBot�
--EOT
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by philzilla:
currently residing on the Wirral, which doesn't mean i support Tranmere, before you say owt. i don't really follow footie at all. where's yer berd from?
You might as well be speaking Chinese. Funny, I thought I spoke English. I'll have to get one of my UK friends to translate.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Arkham_c:
You might as well be speaking Chinese. Funny, I thought I spoke English. I'll have to get one of my UK friends to translate.
owt = anything
nowt = nothing
Tranmere = tranmere rovers (tee hee)
berd = lovely young lady (or similar!)
wirral = ... hang on, what the hell am I doing up at 1.45am...
Night
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Simon Mundy:
owt = anything
nowt = nothing
Tranmere = tranmere rovers (tee hee)
berd = lovely young lady (or similar!)
wirral = ... hang on, what the hell am I doing up at 1.45am...
Night
simon, you have an almost perfect grasp of the English language. 10/10
home ya did yer homework before you went to bed
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Ah - I take all the nicking car stuff back then if your living on the Wirral.
Me berd, well, she's actually from Bury, so not too near Liverpool at all really, just closer than most people I know - apart from my mate Dave, who is actually from the Wirral.
Less than four hours sleep a night? Ouch! Saying that - as a student, I quite often get only that, but for completely different reasons
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|