Well I have these two statements. IGNORE THE SECURITY RISK (SQL INJECTION) A user inputs a date in this format 2016-7-9. How can one get and modify the date since I've tried with
$sql = "SELECT DISTINCT msisdn FROM customer WHERE time_paid BETWEEN ADDDATE('$time1',INTERVAL 0 HOUR) AND ADDDATE('$time2',INTERVAL '23:59' HOUR_MINUTE)";
Where $time1 and $time2 are in this format so the select statement does not work. I could be wrong but I think it expects in this format 2016-01-12?
This works:
$sql = "SELECT DISTINCT msisdn FROM customer WHERE time_paid BETWEEN 2015-01-10 12:23:34 AND 2017-12-12 12:12:12";
Anyone how can I use this format 2016-3-3 in my query?
time_paidcolumn?time_paidDATETIME ...on the table