当前位置: 首页>>代码示例>>PHP>>正文


PHP Sqlite::getRowsWhere方法代码示例

本文整理汇总了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;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:7,代码来源:lxguardwhitelistlib.php

示例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}'");
    }
}
开发者ID:digideskio,项目名称:hypervm,代码行数:25,代码来源:securityblanket.php

示例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'));
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:32,代码来源:dnslib.php

示例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;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:25,代码来源:domainipaddresslib.php

示例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;
 }
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:9,代码来源:sslipaddresslib.php

示例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);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:9,代码来源:hostdenylib.php

示例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;
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:10,代码来源:exclusiveiplib.php

示例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);
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:10,代码来源:davuserlib.php

示例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];
 }
开发者ID:zseand,项目名称:kloxo,代码行数:11,代码来源:cronlib.php

示例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;
 }
开发者ID:zseand,项目名称:kloxo,代码行数:12,代码来源:mimehandler.php

示例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;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:12,代码来源:invoicelib.php

示例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;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:13,代码来源:lxdb.php

示例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;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:14,代码来源:dnstemplatelib.php

示例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;
 }
开发者ID:soar-team,项目名称:kloxo,代码行数:25,代码来源:pserverlib.php

示例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);
 }
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:6,代码来源:lxclient.php


注:本文中的Sqlite::getRowsWhere方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。