-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
26 lines (15 loc) · 723 Bytes
/
data.php
File metadata and controls
26 lines (15 loc) · 723 Bytes
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
<?php
$conn = new mysqli('localhost', 'karim', 'Karim@01', 'cfwa');
$query = "UPDATE response SET is_read=1";
$stm = $conn->query($query);
if($stm){
$query2 = 'SELECT `response_title` as msg FROM response WHERE is_read=1 ORDER BY response_date DESC';
$stm2 = $conn->query($query2);
$query3 = 'SELECT `response_title` as msg FROM concern WHERE is_read=1 ORDER BY concern_date DESC';
$stm3 = $conn->query($query2);
if($stm2 || $stm3){
$row = mysqli_fetch_all($stm2);
$row3 = mysqli_fetch_all($stm3);
echo json_encode($row+$row3);
}}
?>