Please can anyone help with this? I want to print out my data from NOW for today and the next 3 days (4 days in total). Here's my code so far - which prints everything in the database...
$sql = "SELECT dt, people, c_fname, c_lname, c_phone, c_notes, code FROM restaurantbooking_bookings ORDER BY dt ASC";
$result = $conn->query($sql);
if ($result-> dt < DateTime.Now) { // output data of each row while($row = $result->fetch_assoc()) { print ' <div class="product_item"> Date/Time: ' . $row["dt"]. ' - Pers: ' . $row["people"]. ' - Name: ' . $row["c_fname"]. ' ' . $row["c_lname"]. ' <br/> Tel: ' . $row["c_phone"]. ' - VCode: ' . $row["code"]. ' <br/> Notes: ' . $row["c_notes"]. '<br/>'; } } else { print "0 results";
Thanks in advance