Jump to content

Looping through my query


spangle1187

Recommended Posts

I am trying to loop through the array that I have created to check to see if any of the dates in the array match the date I am passing (which is todays date) and then asks the user to consider making another booking.

 

This is what I have so far but I am not sure how to finish it off:

 

$table_id = 'booking';
	$query = "SELECT * FROM booking WHERE bookingDate = 'newDate'";
	$result = mysql_query($query);

	$loop = $end_Time - $start_Time;
	echo $loop;

	while($row = mysql_fetch_assoc($result)){
		if ($startTime || $end_Time == 'booking.startTime'){
			echo "choose another booking";
		}{
			echo "booking is ok";
		}

Link to comment
https://forums.phpfreaks.com/topic/231953-looping-through-my-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.