MySQL Forums
Forum List  »  Newbie

How to query for rec's WHERE >= $start_date ?
Posted by: Fran Lee
Date: December 29, 2017 12:25PM

I'm using PHP and MySQL to search for records starting with a given date...
Like...

// query excerpt to search for records with current date or greater - it works

WHERE DATE(tbl-1.dates) >= CURDATE()
ORDER BY tbl-1.dates";


The Question: How to specify the start date... kid of like the below's guess...


$start_date = "01/15/2018"; // specify the start date

// query excerpt to search for records with a specified date or greater

WHERE DATE(tbl-1.dates) >= $start_date
ORDER BY tbl-1.dates";

I've just guessed above and wanted to ask before I broke the database :-)

Thanks for any help.

Options: ReplyQuote


Subject
Written By
Posted
How to query for rec's WHERE >= $start_date ?
December 29, 2017 12:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.