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 ='
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
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
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
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
>
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
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
:[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
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
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
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 (
11 matches
Mail list logo