I have a query like that:
$monitor = $db->query("SELECT * FROM event, step WHERE step = idstep ");
$countquery = $monitor->rowCount();
if ($countquery == 0){
echo "no records";
}else{
echo "show records";
and i would like to be:
$today = ("Y/m/d");
$monitor = $db->query("SELECT * FROM event, step WHERE step = idstep AND datastep = $today");
$countquery = $monitor->rowCount();
if ($countquery == 0){
echo "no records";
}else{
echo "show records";
In my database, datastep is stored like: Y/m/d H:M and when i compare the 2 dates i have no results. i would like to not consider hours and minutes. How can i compare the dates, without changing the field datastep in the database? I would like to convert datastep in Y/m/d format.