I'm trying to select data from a specific table in my database, but I want to be able to only view the last 3 days worth of data, I have the following code but for some reason I can't get it to work :(
$result = mysqli_query($con,"SELECT * FROM demands WHERE t.date >= DATE_ADD(CURDATE(), INTERVAL -3 DAY)");
I am getting the following error; Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
Any help is appreciated!