mel_bagley Posted April 3, 2006 Share Posted April 3, 2006 Hi All,I've got a mySQL table with the following fields:id, name, expiryDateThe expiry date is in the format dd/mm/yyyy and I would like to show only the dates newer than those in the db, for example1,chair,09/08/20062, balloon, 05/03/20063, brick, 12/04/2006today's date = 03/04/2006 phpdate = (2006-04-03 00:00:00)What would I need to be able to cycle through the table and return the results but leaves out the past results e.g. balloon.Many thanks in advance.Kind RegardsMel Quote Link to comment Share on other sites More sharing options...
Barand Posted April 3, 2006 Share Posted April 3, 2006 MySQL gives you DATE and DATETIME column type and dozens of functions to use with them. Why igmore them invent your own type? Store dates in a database to be functional, not to look pretty. You can format them any way you want when you query the table or output the results. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.