0
當我必須搜索任何東西時,它會給我提供正確的sesrch,但是當我單擊頁面2瀏覽以顯示更多記錄時,它不會顯示正確的結果。簡而言之,我在其上應用了paginatiion,但在點擊第二頁後,搜索查詢不會僅運行簡單的查詢運行。請告訴我哪個是問題?搜索沒有在分頁上運行
<form method="post" action=""><input type='textbox' name="searchfield" id='searchfield' $value style='height:25px; width:275px; border-radius:5px 5px 5px 5px; margin-top:50px; margin-bottom:50px;' /> <input type="submit" id='GetBtn' name="GetBtn" class='GetBtn' value="Search"></form>
<?php
if(isset($_GET['GetBtn'])){
$match = str_replace('-',' ',slugify($_POST['searchfield']));
$query_pag_data = "SELECT * FROM `imported_deals` WHERE MATCH (`Name`, `Category`)
AGAINST ('$match' IN BOOLEAN MODE)";
}
else{
$query_pag_data = "SELECT * FROM `imported_deals` LIMIT $per_page (`Name`, `Category`)
AGAINST ('$match' IN BOOLEAN MODE)";
}
$PAGING = new PAGING($query_pag_data,10);
$query = $PAGING->sql;
$res = mysql_query($query);
if(!$res) die(mysql_error());
if($show['subcat_name'] != '')
{
echo($PAGING->show_paging("http://yespricer.com/","deals/".slugify($fullname)."/".slugify($show['subcat_name'])."/page"));
}
else
{
echo($PAGING->show_paging("http://yespricer.com/","deals/".slugify($fullname)."/page"));
}
?>