-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jake Conk wrote:
| Hello,
|
| I have a table with 2 columns, file_id and owner_id. I want to select
| all the files and order by file_id but I want the ones that belong to
| me to show up first then everyone elses. Is this possible and how?
|
| This
It looks like you can use multiple order by's...
SELECT * FROM files ORDER BY owner_id, file_id
or something like that... The documentation is really good :)
On May 12, 2008, at 2:36 PM, Jake Conk wrote:
Hello,
I have a table with 2 columns, file_id and owner_id. I want to select
all the
On Mon, May 12, 2008 at 11:36 AM, Jake Conk [EMAIL PROTECTED] wrote:
SELECT * FROM whiles WHERE owner_id=my_id first THEN SELECT * FROM
files ORDER by file_id
Would this work?
SELECT *
FROM whiles
WHERE owner_id = my_id
ORDER BY owner_id = my_id DESC, file_id
I would do something along these lines:
SELECT file_id, owner_id, (owner_id = my_id) as 'mine'
FROM whiles
WHERE blah blah
ORDER BY mine, file_id
Jake Conk wrote:
Hello,
I have a table with 2 columns, file_id and owner_id. I want to select
all the files and order by file_id but I want the