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


PHP Sqlite::existInTable方法代碼示例

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


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

示例1: add_admin

function add_admin($pass)
{
    global $gbl, $sgbl, $login, $ghtml;
    $client = new Client(null, null, 'admin');
    $login = $client;
    $client->initThisDef();
    $client->priv->pserver_num = 'Unlimited';
    $client->priv->maindomain_num = 'Unlimited';
    $client->priv->vps_num = 'Unlimited';
    $client->priv->client_num = 'Unlimited';
    $client->ddate = time();
    $ddb = new Sqlite(null, "client");
    if (!$ddb->existInTable("nname", 'admin')) {
        if ($sgbl->dbg > 0) {
            $pass = 'lxlabs';
            $res['contacemail'] = 'admin@lxcenter.org';
        }
        $res['password'] = crypt($pass);
        $res['cttype'] = 'admin';
        $res['cpstatus'] = 'on';
        if (if_demo()) {
            $res['email'] = "admin@lxcenter.org";
        }
        $client->create($res);
        $client->driverApp = new client__sync(null, null, 'admin');
        $client->was();
        lxfile_mkdir("__path_client_root/{$client->nname}");
        lxfile_generic_chown("__path_client_root/{$client->nname}", "lxlabs");
    }
    $notif = new Notification(null, null, $client->getClName());
    $notif->initThisDef();
    $notif->dbaction = 'add';
    $notif->text_newaccountmessage = lfile_get_contents("__path_program_root/file/welcome.txt");
    $notif->parent_clname = $client->getClName();
    $notif->write();
    $display = new sp_SpecialPlay(null, null, $client->getClName());
    $display->initThisDef();
    $display->parent_clname = $client->getClName();
    $display->dbaction = 'add';
    $display->write();
}
開發者ID:lonelywoolf,項目名稱:hypervm,代碼行數:41,代碼來源:initlib.php

示例2: add_slave

function add_slave($pass)
{
    global $gbl, $sgbl, $login, $ghtml;
    $client = new Slave(null, null, 'slave');
    $client->initThisDef();
    $ddb = new Sqlite(null, "slave");
    if (!$ddb->existInTable("nname", 'slave')) {
        $res['password'] = $pass;
        $res['cttype'] = 'slave';
        if (if_demo()) {
            $res['email'] = "admin@example.org";
        }
        $client->create($res);
        $client->write();
    }
}
開發者ID:zseand,項目名稱:kloxo,代碼行數:16,代碼來源:lxlib.php

示例3: exists_in_db

function exists_in_db($server, $class, $nname)
{
    $db = new Sqlite($server, get_table_from_class($class));
    return $db->existInTable('nname', $nname);
}
開發者ID:hypervm-ng,項目名稱:hypervm-ng,代碼行數:5,代碼來源:objectactionlib.php


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