iam developing a webSite using php and mysql and am really beginner in this area.. Now iam stuck in a place where i have to check the current date is newer than the date in my database
so i have written a code like this but it's not working
$SQL = "UPDATE adverts SET active='0' WHERE enddate<NOW()";
$result = mysqli_query($con,$SQL);
in the above code 'advert' is my table name and 'enddate' is where the column containing date in database
can anybody please help me?