Scorpion Posted February 9, 2011 Share Posted February 9, 2011 Right i'm building a site that will have a deals page and in the table i have id, Title, Start_date, End_date,Important, Information, Full_information, Price, Image(<-- a link to where the picture is) well i need to make sure that the deals are only there between two dates so i did a query below and thought that looks like it works but nope and there is data in the table 1 One Deal 2011-02-01 2011-02-23 Just some info More info £20.50 .jpg SELECT id, Title, Start_date, End_date,Important, Information, Full_information, Price, Image FROM web_Deals WHERE Start_date <= '.date("Y-m-d").' AND End_date >= '.date("Y-m-d") I'm using php so thats where .date("Y-m-d") is coming from and yes the date on the server is correct. Hopefully its something simple if there isn't a way to do it this way but another way i will be happy to learn. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.