query( "SELECT a.bill_id, a.item_id, a.title, a.reference1, a.reference2, a.reference3, a.reference4, a.created_at, b.is_reference1, b.is_reference2, b.is_reference3, b.is_reference4, c.reference1 as reference1_title, c.reference2 as reference2_title, c.reference3 as reference3_title, c.reference4 as reference4_title FROM staff_rms_bill a LEFT JOIN rms_bill_item b ON ( a.item_id = b.item_id ) LEFT JOIN rms_bill_item_translation c ON ( b.item_id = c.item_id ) WHERE a.deleted_at IS NULL AND a.staff_id = '".$staff_info['staff_id']."' AND a.item_id = '".$array['item_id']."' AND b.deleted_at IS NULL AND b.status = 'active' AND c.lang = '".$array['lang']."'" ) ; if ( $mysqli_bill->num_rows > 0 ){ $status = '200' ; while ( $row_bill = $mysqli_bill->fetch_assoc() ){ $list[] = $row_bill ; } } $data['list'] = $list ; } require( $require_sub.'footer.php' ) ; ?>