Skip to content

Commit 2f0deda

Browse files
committed
added limit in select query for display
1 parent d18724c commit 2f0deda

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

addFine.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
require_once('calendar/classes/tc_calendar.php');
34
?>
45

@@ -121,7 +122,7 @@
121122
});
122123

123124
jQuery(function($){
124-
$("#searchbox").Watermark("Search Student ID, Name");
125+
$("#searchbox").Watermark("Search Card No., Student Name");
125126
});
126127

127128

@@ -320,6 +321,7 @@ function updateFine() {
320321
$rs=mysql_query($sql);
321322
$class=0;
322323

324+
323325
while($row=mysql_fetch_array($rs)){
324326
$class++;
325327
?>

searchstudent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
$page = $_POST['page'];
4040
}
4141

42-
$sql_res="select * from borrower where fname like '$q%' or lname like '$q%' or card_no like '$q%' ";
42+
$sql_res="select * from borrower where fname like '$q%' or lname like '$q%' or card_no like '$q%' limit 5";
4343
}
4444

4545
$r=mysql_query($sql_res);
@@ -72,7 +72,7 @@
7272

7373
<td style="font-size:13px; font-weight:bold; color:#666;" width="346"><?php echo $j; ?>
7474
<div class="td"><div style="padding-top:0;">
75-
<?php echo $ffname; ?>&nbsp;<?php echo $flname; ?>&nbsp;<?php echo $fmi; ?></div>
75+
<?php echo $final_idnumber; ?>&nbsp; - &nbsp;<?php echo $ffname; ?>&nbsp;<?php echo $flname; ?></div>
7676
</div></a></td>
7777

7878
<tr><td style="font-size:11px;color:#666;" width="346"><?php echo $j; ?>

0 commit comments

Comments
 (0)