csrtechnew.ohctech.in/select_vet_appointment.php
2025-08-29 16:30:39 +05:30

27 lines
642 B
PHP

<?php
include('includes/config/config.php');
include('includes/functions.php');
$indent_id = $_POST['indent_id'];
// Fetch indent
$query = "SELECT * FROM vet_appointment WHERE city_id = '$indent_id'";
error_log($query);
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_assoc($result);
// Get patient name
$bene_id = $row['bene_name'];
$patient_name = '';
$pq = mysqli_query($conn, "SELECT patient_name FROM patient_master WHERE id = '$bene_id'");
error_log($pq);
if ($pr = mysqli_fetch_assoc($pq)) {
$patient_name = $pr['patient_name'];
}
// Return all data
$row['patient_name'] = $patient_name;
echo json_encode($row);
?>