RE: Ordering rows whit a select from where in ( exp )

2005-04-25 Thread mathias fatene
Do that , SELECT field_name FROM meta WHERE id ='13' Union SELECT field_name FROM meta WHERE id ='11' Union SELECT field_name FROM meta WHERE id ='7' Union SELECT field_name FROM meta WHERE id ='8' Union SELECT field_name FROM meta WHERE id ='9' Union SELECT field_name FROM meta WHERE id ='

Re: Ordering rows whit a select from where in ( exp )

2005-04-25 Thread =?ISO-8859-1?Q?Johan_H=F6=F6k?=
Hi Adrian, you can do SELECT field_name FROM meta WHERE id IN ('13','11','7','8','9','10','12') ORDER BY FIELD(id,'13','11','7','8','9','10','12') /Johan Adrian wrote: Hi everyone, Here is my issue: I have this Query : SELECT field_name FROM meta WHERE id IN

Re: re-ordering rows

2002-02-15 Thread DL Neil
Bryan, I apologise, did I mistakenly call you Brent earlier!? > Indeed. I have a relatively large (few dozen) number > of tables that are accessed via PHP and a web > interface. The script pulls information from these > tables to generate pull-down menus. It would be nice > if these pull-down men

Re: re-ordering rows

2002-02-15 Thread DL Neil
Brent, > >What Rick said is absolutely correct and you probably are obsessing about > >something that doesn't matter. But I would venture you are using an > >auto-number field as the primary key when you could easily change it to a > >function something similar to: set ID = MAX(ID) + 1. > > Kei

RE: re-ordering rows

2002-02-14 Thread BD
ndy for display purposes. Brent >-Original Message- >From: Bryan McCloskey [mailto:[EMAIL PROTECTED]] >Sent: Thursday, February 14, 2002 4:03 PM >To: [EMAIL PROTECTED] >Subject: RE: re-ordering rows > > >You're right, it's not important how the data is >

RE: re-ordering rows

2002-02-14 Thread Keith A. Calaman
ssage- From: Bryan McCloskey [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:03 PM To: [EMAIL PROTECTED] Subject: RE: re-ordering rows You're right, it's not important how the data is stored inside the database. I was just hoping that there would be a way to set a default

RE: re-ordering rows

2002-02-14 Thread Bryan McCloskey
You're right, it's not important how the data is stored inside the database. I was just hoping that there would be a way to set a default order so that I wouldn't have to write a cumbersome ORDER BY phrase every time I wanted to see the data. I thought that perhaps indexes could accomplish this, s

RE: re-ordering rows

2002-02-14 Thread Rick Emery
:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:26 AM To: [EMAIL PROTECTED] Subject: re-ordering rows Bryan, Thursday, February 14, 2002, 4:54:11 PM, you wrote: BM> Greetings, BM> How do I get the rows in a table to be in a different BM> order? I know I can sort a SELECT statemen

Re: re-ordering rows

2002-02-14 Thread Tod Harter
On Thursday 14 February 2002 09:54, Bryan McCloskey wrote: > Greetings, > > How do I get the rows in a table to be in a different > order? I know I can sort a SELECT statement with an > ORDER BY clause, but how do I make this a permanent > adjustment to the table, so that all future SELECTs > will

re-ordering rows

2002-02-14 Thread Victoria Reznichenko
Bryan, Thursday, February 14, 2002, 4:54:11 PM, you wrote: BM> Greetings, BM> How do I get the rows in a table to be in a different BM> order? I know I can sort a SELECT statement with an BM> ORDER BY clause, but how do I make this a permanent BM> adjustment to the table, so that all future SEL

re-ordering rows

2002-02-14 Thread Bryan McCloskey
Greetings, How do I get the rows in a table to be in a different order? I know I can sort a SELECT statement with an ORDER BY clause, but how do I make this a permanent adjustment to the table, so that all future SELECTs will produce ordered data? How does MySQL know what orders the rows are in (