-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusinessdetail.php
51 lines (35 loc) · 1.09 KB
/
businessdetail.php
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
<?php
$con=mysqli_connect("50.62.209.47","dbddbadmin","Dbddemo@3579","dbddemo");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$id = $_GET['id'];
$result = mysqli_query($con,"SELECT * FROM dcomp_mast WHERE id='$id'");
$result2 = mysqli_query($con,"SELECT * FROM dcomp_contact WHERE exetype='CONTACT' AND compID='$id'");
$json = array();
while($row = $result->fetch_assoc() ) {
$json[] = array(
'id' => $row['id'],
'compname' => $row['compname'],
'country' => $row['country'],
'catID' => $row['catID'],
'busType' => $row['busType'],
'website'=>$row['website'],
'compP rofile'=>$row['compProfile'],
'image' =>$row['scrnShotPath'].$row['scrnShotImg']
);
}
while($row2 = $result2->fetch_assoc()) {
$json[] = array(
'name' =>$row2['fName']." ".$row2['lName'],
'desig' =>$row2['desig'],
'phone' =>$row2['phone'],
'address' =>$row2['city'].", ".$row2['country'],
'email' =>$row2['email']
);
}
$jsonstring = json_encode($json);
echo $jsonstring;
mysqli_close($con);
?>