PDA

View Full Version : Returning last completed DB record based on date column


lux
07-03-2006, 09:53 PM
Hey there,

Working with php

I have a query that returns the latest db record based on a date column.

Some of the records are to be completed in the future by the user and therefore should not be shown.

So what Iím hoping to do I return the last record based on the date column thatís been completed; would somebody be able to help me?


Thanks people!

davidj
07-05-2006, 02:20 PM
just display only one record from your result array but the trick is in the sort which is in your SQL

SELECT * FROM table WHERE criteria = 'a' ORDER BY field