コード例 #1
0
ファイル: base_dao.php プロジェクト: hardikamutech/hammu
 public function findIdByExample(OW_Example $example, $cacheLifeTime = 0, $tags = array())
 {
     if ($example === null) {
         throw new InvalidArgumentException('argument must not be null');
     }
     $example->setLimitClause(0, 1);
     $sql = 'SELECT `id` FROM ' . $this->getTableName() . $example;
     return $this->dbo->queryForColumn($sql, array(), $cacheLifeTime, $tags);
 }
コード例 #2
0
ファイル: cache_backend_mysql.php プロジェクト: ZyXelP/oxwall
 public function test($key)
 {
     return $this->dbo->queryForColumn("SELECT `id` FROM `" . $this->getCacheTableName() . "` WHERE `key` = :key AND `expireTimestamp` >= :ts", array('key' => $key, 'ts' => time())) ? true : false;
 }