當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SearchEngine::ReturnRecordset方法代碼示例

本文整理匯總了PHP中SearchEngine::ReturnRecordset方法的典型用法代碼示例。如果您正苦於以下問題:PHP SearchEngine::ReturnRecordset方法的具體用法?PHP SearchEngine::ReturnRecordset怎麽用?PHP SearchEngine::ReturnRecordset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SearchEngine的用法示例。


在下文中一共展示了SearchEngine::ReturnRecordset方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SearchEngine

        $pg = 1;
    }
    $engine = new SearchEngine($i);
    if (!empty($_GET['count'])) {
        if (preg_match("/^\\d+\$/", $_GET['count'])) {
            $engine->criteria->resultsperpage = $_GET['count'];
        } elseif ($_GET['count'] == -1) {
            $engine->criteria->resultsperpage = 999999999;
        }
        if ($hardlimit) {
            $engine->criteria->resultsperpage = min($engine->criteria->resultsperpage, $hardlimit);
        }
    }
    //return a recordset
    //if want en then we HAVE to use the non cached version!
    $recordSet = $engine->ReturnRecordset($pg, isset($_GET['en']));
} elseif (!empty($_GET['en']) || !empty($_GET['ppos'])) {
    if (!empty($_GET['ftf'])) {
        $mod_sql .= " and ftf = 1";
    }
    $recordSet =& $db->Execute("select gridimage_id,title,title2,grid_reference,gi.realname as credit_realname,if(gi.realname!='',gi.realname,user.realname) as realname,imageclass,nateastings,natnorthings,if(use6fig=1,6,natgrlen) as natgrlen,gi.user_id {$sql_from} \r\n\tfrom user \r\n\tinner join gridimage gi using(user_id) \r\n\tinner join gridsquare using(gridsquare_id) \r\n\twhere {$mod_sql} {$sql_crit}");
} else {
    if (!empty($_GET['supp'])) {
        $mod_sql = 1;
        //no point checking what will always be 1 ;-)
    }
    if (!empty($_GET['ftf'])) {
        $mod_sql .= " and ftf = 1";
    }
    $recordSet =& $db->Execute("select gridimage_id,title,title2,grid_reference,credit_realname,realname,imageclass,user_id {$sql_from} \r\n\tfrom gridimage_search gi \r\n\twhere {$mod_sql} {$sql_crit}");
}
開發者ID:s-a-r-id,項目名稱:geograph-project,代碼行數:31,代碼來源:export.inc.php


注:本文中的SearchEngine::ReturnRecordset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。