-----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 is what I'm trying to accomplish:
|
| SELECT * FROM whiles WHERE owner_id=<my_id> first THEN SELECT * FROM
| files ORDER by file_id

select * from files where owner_id = you
union
(select * from files where owner_id != you order by file_id)


- --
- ------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED])
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKI81dbiP+9ubjBwRAuOiAJ9e4kGv1qIUs7CbF5LGv30CaQfZgACdHXFM
FKFSw66nKpVqcJDug776TBI=
=YQxy
-----END PGP SIGNATURE-----

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to