<?php
$repeat_query= "SELECT a.id, a.booking_id,a.description,
b.id AS book_id,b.name
FROM booking_line a
JOIN booking b
ON a.booking_id = b.id WHERE a.is_repeat = '1'
ORDER BY b.name";
$i=0;
if ($r_result = mysqli_query($mysqli, $repeat_query)) {
// Return the number of rows in result set
$rowcount = mysqli_num_rows( $r_result );
// Display result
//echo $rowcount."<br>";
$repeat = array();
$repeat_user = array();
while($repeat_row = mysqli_fetch_assoc($r_result))
{
$repeat[] = $repeat_row;
}
} print_r($repeat);