Forum Moderators: open

Message Too Old, No Replies

Prefer order

prefer order

         

orion_rus

9:47 am on Nov 7, 2007 (gmt 0)

10+ Year Member



Hello world i have 100 rows in database
i need to get 5 of it with the following condition
Rows have field countryid -> i need to make output all there countryid=15 then others if number of rows < 5.
Can somebody help me?

coopster

11:37 pm on Nov 8, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Perhaps a UNION query, first selecting the id = 15 and then UNION to the others.