Example #1
0
function FullSearchNextMatch($dbi, $res)
{
    if ($hash = mssql_fetch_array($res)) {
        return MakePageHash($hash);
    } else {
        return 0;
    }
}
Example #2
0
function RetrievePage($dbi, $pagename, $pagestore)
{
    $pagename = addslashes($pagename);
    $table = $pagestore['table'];
    $pagetable = $pagestore['page_table'];
    $query = "select * from {$table} where pagename='{$pagename}'";
    // echo "<p>query: $query<p>";
    $res = msql_query($query, $dbi['dbc']);
    if (msql_num_rows($res)) {
        $dbhash = msql_fetch_array($res);
        $query = "select lineno,line from {$pagetable} " . "where pagename='{$pagename}' " . "order by lineno";
        $msql_content = "";
        if ($res = msql_query($query, $dbi['dbc'])) {
            $dbhash["content"] = array();
            while ($row = msql_fetch_array($res)) {
                $msql_content .= $row["line"];
            }
            $dbhash["content"] = explode("\n", $msql_content);
        }
        return MakePageHash($dbhash);
    }
    return -1;
}