I have a postgres database with a table called workorders. In it is a column called date_out where the date is recorded like 2009-09-23. I want to sort this table data in a php page based on a users date range, ie, sort the table by date begin 2009-09-01 end 2009-09-31. Its for an accounts package I am creating for my company. Is there anyway I can do this. I can connect to my database but don't know how to sort the data. Also can I limit the number of views to say 15 lines, then onto a next page? Thanks for anyone that can help me out.