forked from nisiya/MaristIDCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backendsturpt.php
44 lines (39 loc) · 1.15 KB
/
backendsturpt.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
<?php
$debug = true;
$q = $_GET['q'];
require('includes/connect_db_c9.php');
mysqli_select_db($dbc,"ajax_demo");
if(isset($q)){
//$q = explode(".", $q);
$query ="SELECT STU_ID, STU_TAG, STU_LNAME, STU_FNAME FROM STUDENT, EMPLOYER WHERE STUDENT.EMP_ID=EMPLOYER.EMP_ID AND EMPLOYER.EMP_NAME LIKE'%".$q."%'";
echo $query;
$results = mysqli_query($dbc, $query);
echo '<div class="span3" style="height: 200px !important; overflow: auto;">';
echo '<TABLE class="table table-condensed table-striped table-hover">';
echo '<THEAD>';
echo '<TR>';
echo '<TH>ID</TH>';
echo '<TH>Tag</TH>';
echo '<TH>Last Name</TH>';
echo '<TH>First Name</TH>';
echo '</TR>';
echo '</THEAD>';
echo '<TBODY>';
if($results){
while ( $row = mysqli_fetch_array( $results , MYSQLI_ASSOC ) ){
echo "<TR class='clickable-row'>";
echo '<TD>' . $row['STU_ID'] . '</TD>' ;
echo '<TD>' . $row['STU_TAG'] . '</TD>' ;
echo '<TD>' . $row['STU_LNAME'] . '</TD>' ;
echo '<TD>' . $row['STU_FNAME'] . '</TD>' ;
echo '</TR>';
}
echo '</TBODY>';
echo '</TABLE>';
}
echo '</div>';
# Free up the results in memory
mysqli_free_result( $results );
mysqli_close( $dbc ) ;
}
?>