-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetMerchantId.php
More file actions
57 lines (53 loc) · 1.58 KB
/
getMerchantId.php
File metadata and controls
57 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!-- <?php
include 'DatabaseConfig.php';
include 'helper_functions/authentication_functions.php';
include 'addAvailableBooking.php';
//get categories from the database
global $doctor_Id;
$categories = "SELECT Merchant_ID, name FROM doctors WHERE Id = '$doctor_Id'";
$result = mysqli_query($con, $categories);
if ($result) {
$data = [];
while ($row = mysqli_fetch_assoc($result)) {
$data[] = $row;
}
echo json_encode(
[
'success' => true,
'data' => $data,
'message' => "Mercahnts fetched successfully"
]
);
} else {
echo json_encode(
[
'success' => false,
'message' => 'Error fetching Merchants'
]
);
}
// include 'DatabaseConfig.php';
// include 'helper_functions/authentication_functions.php';
// //get sql from the database
// $sql = "select User_Id from users where username='Mahan'";
// $query = mysqli_query($con, $sql);
// if ($query) {
// $data = '';
// while ($row = mysqli_fetch_assoc($query)) {
// $data = $row['User_Id'];
// }
// echo json_encode(
// [
// 'success' => true,
// 'data' => $data,
// 'message' => "Mercahnts fetched successfully"
// ]
// );
// } else {
// echo json_encode(
// [
// 'success' => false,
// 'message' => 'Error fetching Merchants'
// ]
// );
// } -->