本文整理汇总了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();
}
示例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();
}
}
示例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);
}