What is the syntax required for me to specifically select rows of an SQL table which contain a certain value?
I have a database which has date, time, location and description columns. I need to display ONLY the rows which have today's date in them.
I have tried this:
I have a $date
value which contains today's date in the same format as my database and I would like to be able to select and display ONLY the rows in the table which contain the same date as today's date.
So I tried this:
$current = date("j M l");
$data = $con->query('SELECT id, date, location, description, time from calendar WHERE date LIKE '$current'');
but it didn't work...