01.
<?php
02.
$strQuery
=
"SELECT * FROM `core_assignment` WHERE `show` = 'y' ORDER BY ABS(zone_core) ASC "
;
03.
04.
if
(isset(
$_POST
[
'search'
]) ) {
05.
$search
=
$_POST
[
'search'
];
06.
}
else
{
07.
$search
=
''
;
08.
}
09.
$strQuery
=
"SELECT * FROM core_assignment WHERE core_description LIKE '%"
.
$search
.
"%'"
;
10.
if
(isset(
$_POST
[
'zone_core'
]) &&
is_numeric
(
$_POST
[
'zone_core'
]) ) {
11.
$strQuery
.=
" AND zone_core = "
.
$_POST
[
'zone_core'
];
12.
}
13.
$strQuery
=
$strQuery
.
";"
;
14.
15.
$check_log
= mysql_query(
$strQuery
)
or
die
(mysql_error());
16.
$num
= mysql_num_rows(
$check_log
);
17.
if
(
$num
<=0) {
18.
}
19.
$n
=0;
20.
while
(
$objResult
= mysql_fetch_array(
$check_log
)){
21.
?>