PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Nov 23, 2014 1:37 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Jun 17, 2012 3:29 am 
Offline
Forum Contributor

Joined: Sat Mar 31, 2012 6:50 am
Posts: 112
i have 2 columns:
1)pages_id (the id's of pages 1,2,3...)
2)pages_paid(yes,no)
...
i need in my query to SELECT...FROM...WHERE...ORDERY BY:first where pages_paid='yes' and then by id...i mean: the pages_paid be first...and then to order the other products by id :S...please


Top
 Profile  
 
PostPosted: Sun Jun 17, 2012 4:38 am 
Offline
DevNet Master
User avatar

Joined: Sun Feb 15, 2009 12:08 pm
Posts: 2775
Location: .za
Have a look at example 4 on the page below
http://www.techonthenet.com/sql/order_by.php

_________________
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group