示例#1
0
function get_posttableids()
{
    $tableids = array(0);
    foreach (C::t('forum_post')->show_table() as $table) {
        list($tempkey, $tablename) = each($table);
        $tableid = gettableid($tablename);
        if (!preg_match('/^\\d+$/', $tableid)) {
            continue;
        }
        $tableid = intval($tableid);
        if (!$tableid) {
            continue;
        }
        $tableids[] = $tableid;
    }
    return $tableids;
}
示例#2
0
function get_posttableids()
{
    $tableids = array(0);
    $query = DB::query("SHOW TABLES LIKE '" . DB::table('forum_post') . "\\_%'");
    while ($table = DB::fetch($query)) {
        list($tempkey, $tablename) = each($table);
        $tableid = gettableid($tablename);
        if (!preg_match('/^\\d+$/', $tableid)) {
            continue;
        }
        $tableid = intval($tableid);
        if (!$tableid) {
            continue;
        }
        $tableids[] = $tableid;
    }
    return $tableids;
}
示例#3
0
function update_posttableids()
{
    $tableids = array(0);
    $query = DB::query("SHOW TABLES LIKE '" . DB::table('forum_post') . "\\_%'");
    while ($table = DB::fetch($query)) {
        list($tempkey, $tablename) = each($table);
        $tableid = gettableid($tablename);
        if (!$tableid) {
            continue;
        }
        $tableids[] = $tableid;
    }
    DB::insert('common_setting', array('skey' => 'posttableids', 'svalue' => serialize($tableids)), false, true);
    save_syscache('posttableids', $tableids);
}