本文整理匯總了PHP中Sqlite::getRowsWhere方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sqlite::getRowsWhere方法的具體用法?PHP Sqlite::getRowsWhere怎麽用?PHP Sqlite::getRowsWhere使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sqlite
的用法示例。
在下文中一共展示了Sqlite::getRowsWhere方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createExtraVariables
function createExtraVariables()
{
$parent = $this->getParentO();
$sq = new Sqlite(null, "lxguardwhitelist");
$res = $sq->getRowsWhere("syncserver = '{$parent->syncserver}'", array('nname', 'ipaddress'));
$this->__var_whitelist = $res;
}
示例2: security_blanket_main
function security_blanket_main()
{
global $argv;
//sleep(100);
$rem = unserialize(lfile_get_contents($argv[1]));
unlink($argv[1]);
if (!$rem) {
exit;
}
// Merged from 6.1.x/kloxo/bin/common/securityblanket.php (revision 472)
// workaround for the following php bug:
// http://bugs.php.net/bug.php?id=47948
// http://bugs.php.net/bug.php?id=51329
if (is_array($rem->func) && count($rem->func) > 0) {
$class = $rem->func[0];
class_exists($class);
}
// ---
call_user_func_array($rem->func, $rem->arglist);
$sq = new Sqlite(null, $rem->table);
$res = $sq->getRowsWhere("nname = '{$rem->nname}'", array($rem->flagvariable));
if ($res[0][$rem->flagvariable] === 'doing') {
$sq->rawQuery("update {$rem->table} set {$rem->flagvariable} = 'Program Got aborted in the midst. Please try again.' where nname = '{$rem->nname}'");
}
}
示例3: createExtraVariables
function createExtraVariables()
{
// Not here. Two different extra variables are needed, so they are created in synctosystem.
// Brought back here, since the secondary server concept has been abolished in favor of multiple primary servers.
global $gbl, $sgbl, $login, $ghtml;
if ($sgbl->isHyperVm()) {
$this->createExtraVariablesHyperVM();
return;
}
$db = new Sqlite($this->__masterserver, "dns");
$gen = $login->getObject('general')->generalmisc_b;
$serverlist = explode(",", $this->syncserver);
$list = null;
foreach ($serverlist as $server) {
$string = "syncserver LIKE '%{$server}%'";
$nlist = $db->getRowsWhere($string, array('nname'));
$dlistv = "__var_domainlist_{$server}";
$this->{$dlistv} = $nlist;
}
//FIXME: We should only get the addon domains for the domains configured on that particular server. IN the case of single server system, it is not a problem, since that means we will have to get all the domains. but in the case of distributed setup, we need to properly get only the add domains under the domains loaded above.
$dbaddon = new Sqlite(null, "addondomain");
$addr = $dbaddon->getTable(array('nname'));
foreach ($serverlist as $server) {
$dlistv = "__var_domainlist_{$server}";
$this->{$dlistv} = lx_array_merge(array($this->{$dlistv}, $addr));
}
$this->fixDateSerial();
$this->__var_addonlist = $this->getParentO()->getList('addondomain');
$mydb = new Sqlite(null, "ipaddress");
$string = "syncserver = '{$this->syncserver}'";
$this->__var_ipssllist = $mydb->getRowsWhere($string, array('ipaddr', 'nname'));
}
示例4: updateform
function updateform($subaction, $param)
{
global $gbl, $sgbl, $login, $ghtml;
$sq = new Sqlite(null, 'web');
$list = $sq->getRowsWhere("syncserver = '{$this->syncserver}'", array('nname'));
$dlist = get_namelist_from_arraylist($list, 'nname');
if (!$login->isAdmin()) {
$sq = new Sqlite(null, 'domain');
$nlist = $sq->getRowsWhere("parent_clname = '{$login->getClName()}'", array('nname'));
$ndlist = get_namelist_from_arraylist($nlist);
foreach ($dlist as $k => $v) {
if (!array_search_bool($v, $ndlist)) {
unset($dlist[$k]);
}
}
}
if ($dlist) {
$dlist = add_disabled($dlist);
$vlist['domain'] = array('s', $dlist);
} else {
$vlist['domain'] = array('M', "No Domain");
$vlist['__v_button'] = array();
}
return $vlist;
}
示例5: defaultValue
function defaultValue($var)
{
if ($var === 'ipaddr') {
$db = new Sqlite($this->__masterserver, 'ipaddress');
$res = $db->getRowsWhere("nname = '{$this->nname}'");
return $res[0]['ipaddr'];
}
return null;
}
示例6: createExtraVariables
function createExtraVariables()
{
$pserver = $this->getParentO();
$hdb = new Sqlite($this->__masterserver, 'hostdeny');
$string = "syncserver = '{$pserver->nname}' ";
$hlist = $hdb->getRowsWhere($string);
$this->__var_hostlist = $hlist;
dprintr($this->__var_hostlist);
}
示例7: initThisList
static function initThisList($parent, $class)
{
$db = new Sqlite($parent->__masterserver, "ipaddress");
if ($parent->isAdmin()) {
$result = $db->getTable();
} else {
$result = $db->getRowsWhere("clientname = '" . $parent->nname . "'");
}
return $result;
}
示例8: createExtraVariables
function createExtraVariables()
{
$this->__var_system_username = $this->getParentO()->username;
$sq = new Sqlite(null, 'davuser');
$list = $sq->getRowsWhere("parent_clname = '{$this->parent_clname}'", array("username", "realpass"));
$this->__var_davuser = $list;
$sq = new Sqlite(null, 'web');
$list = $sq->getRowsWhere("syncserver = '{$this->getParentO()->syncserver}'", array('nname'));
$this->__var_domlist = get_namelist_from_arraylist($list);
}
示例9: createExtraVariables
function createExtraVariables()
{
global $gbl, $sgbl, $login, $ghtml;
$this->__var_mailto = $this->getParentO()->cron_mailto;
$mydb = new Sqlite($this->__masterserver, "cron");
$parent = $this->getParentO();
$this->__var_cron_list = $mydb->getRowsWhere("username = '{$parent->username}'");
$mydb = new Sqlite($this->__masterserver, "uuser");
$userlist = $mydb->getRowsWhere("nname = '{$parent->username}'");
$this->__var_user_list = $userlist[0];
}
示例10: createExtraVariables
function createExtraVariables()
{
$path = $this->getParentO()->getFullDocRoot();
$this->__var_htp = "{$path}/.htaccess";
$sq = new Sqlite(null, $this->get__table());
$res = $sq->getRowsWhere("parent_clname = '{$this->parent_clname}'");
$result = merge_array_object_not_deleted($res, $this);
foreach ($result as $r) {
$out[$r['mimehandler']] = $r['extension'];
}
$this->__var_mimehandler = $out;
}
示例11: getTotalPaid
function getTotalPaid()
{
$sq = new Sqlite(null, "paymentdetail");
$res = $sq->getRowsWhere("month = '{$this->month}' AND client = '{$this->client}'");
$total = 0;
if ($res) {
foreach ($res as $r) {
$total += $r['amount'];
}
}
return $total;
}
示例12: initThisOutOfBand
static function initThisOutOfBand($parent, $iclass, $mclass, $rclass)
{
$sq = new Sqlite(null, $iclass);
$res = $sq->getRowsWhere("parent_clname = '{$parent->getClName()}'", array("nname"));
$res = get_namelist_from_arraylist($res);
$ret = null;
foreach ($res as $r) {
$ret[] = "or";
$ret[] = array('parent_clname', '=', "'{$mclass}-{$r}'");
}
unset($ret[0]);
return $ret;
}
示例13: createUsed
function createUsed()
{
if (isset($this->used_f)) {
return $this->used_f;
}
$db = new Sqlite($this->__masterserver, 'domaintemplate');
$res = $db->getRowsWhere("dnstemplate = '{$this->nname}'");
if ($res) {
$this->used_f = 'on';
} else {
$this->used_f = 'off';
}
return $this->used_f;
}
示例14: getUsed
function getUsed()
{
$vlist = array("mmail" => "mmail", "dns" => "dns", "web" => "web", "mysqldb" => 'mysqldb', 'mssqldb' => 'mssqldb');
$ret = null;
foreach ($vlist as $k => $v) {
if (!is_array($v)) {
$db = $v;
$vname = "syncserver";
} else {
$db = $v[0];
$vname = $v[1];
}
$db = new Sqlite($this->__masterserver, $db);
$str = "{$vname} = '{$this->nname}'";
$res = $db->getRowsWhere($str, array('nname'));
if ($res) {
$tmp = null;
foreach ($res as $r) {
$tmp[] = $r['nname'];
}
$ret[$k] = implode(", ", $tmp);
}
}
return $ret;
}
示例15: checkMessageUnread
function checkMessageUnread()
{
$sql = new Sqlite($this->__masterserver, 'smessage');
$res = $sql->getRowsWhere("text_sent_to_cmlist LIKE '%,{$this->getClName()},%' AND text_readby_cmlist NOT LIKE '%,{$this->getClName()},%'");
return count($res);
}