-
Notifications
You must be signed in to change notification settings - Fork 4
/
trail.php
37 lines (31 loc) · 932 Bytes
/
trail.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
<?php
include 'conn.php';
// $fetch_candidate_data = "SELECT * FROM candidates";
// $result_candidate_data = mysqli_query($con, $fetch_candidate_data);
// while($res = mysqli_fetch_array($result_candidate_data))
// {
// echo $res['id'].'<br>';
// echo $res['can_id'].'<br>';
// echo $res['can_name'].'<br>';
// echo $res['can_image'].'<br>';
// echo $res['can_party_symbol'].'<br>';
// }
// $id= 1;
// $q = "SELECT can_image, can_party_symbol FROM candidates WHERE id='$id'";
// $res = mysqli_query($con,$q);
// $r = mysqli_fetch_array($res);
// echo $r['can_image'].'<br>'. $r['can_party_symbol'];
$fetch_candidate_data = "SELECT * FROM candidates";
$result_candidate_data = mysqli_query($con, $fetch_candidate_data);
if(mysqli_num_rows($result_candidate_data) > 0)
{
while($res = mysqli_fetch_array($result_candidate_data))
{
echo $res['id'];
}
}
else
{
echo 'no data found';
}
?>