= '" . $default_start_date . "' and date(appointment_date) <= '" . $default_end_date . "' and (abnormalitys='$total_abn_count[$i]' or abnormalitys like '%,$total_abn_count[$i]%' or abnormalitys like '%,$total_abn_count[$i],%' or abnormalitys='%$total_abn_count[$i],%' ) and appointment_type='O' "; if (!$result = @mysqli_query($conn, $query)) { error_log("error in opd chart" . mysqli_error($conn)); exit(); } if (mysqli_num_rows($result) > 0) { while ($row = @mysqli_fetch_array($result)) { array_push($checkup_data, $row[0]); // array_push($date_data, $row[1]); } } else { array_push($checkup_data, 0); } } error_log("opd data trend " . print_r($checkup_data, true)); ?>