I calling out value from database where Datediff
from followupdate
and NOW()
.
If the followupdate
is happened before NOW()
, it works, but if followupdate
comes after NOW()
it does't work.
This is my focus line.
$re1 = mysqli_query($conn,"select booking.* from booking WHERE DATEDIFF( NOW(),followupdate ) <= 3 ;");
already try switch NOW()
and followupdate
back and forward.
date_default_timezone_set("Asia/Kuala_Lumpur");
$re1 = mysqli_query($conn,"select booking.* from booking WHERE DATEDIFF( NOW(),followupdate ) <= 3 ;");
if(mysqli_num_rows($re1) > 0){
while ($row = mysqli_fetch_array($re1) ){
print "<tr style=\"\"> <td>".$row['booking_id']."</td>
";
p/s: assumed the followupdate
is always larger than NOW()
Give me a simple code that can describe what to do. thanks