List:General Discussion« Previous MessageNext Message »
From:Jason Pruim Date:May 12 2008 6:41pm
Subject:Re: Selecting my data first
View as plain text  
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 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
> I would suspect this can be accomplished by a sub query somehow but I
> don't know how.
> Thanks,
> - Jake
> -- 
> MySQL General Mailing List
> For list archives:
> To unsubscribe:


Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337

Selecting my data firstJake Conk12 May
  • Re: Selecting my data firstPhilip M. Gollucci12 May
  • Re: Selecting my data firstJason Pruim12 May
  • Re: Selecting my data firstOmni Adams12 May
  • Re: Selecting my data firstAndy Wallace12 May