本文整理汇总了PHP中Versions::fetchAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Versions::fetchAll方法的具体用法?PHP Versions::fetchAll怎么用?PHP Versions::fetchAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Versions
的用法示例。
在下文中一共展示了Versions::fetchAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllVersions
public static function getAllVersions()
{
$versions = array();
$db = Zend_Registry::get('my_db');
$v = new Versions($db);
$result = $v->fetchAll("version_id = " . $id);
foreach ($result as $row) {
switch (DB_TYPE) {
case 'mysql':
$version = new Version($row->version_id);
break;
case 'oci8':
$version = new Version($row->version_id);
break;
}
array_push($versions, $version);
}
return $versions;
}
示例2: getAllVersions
public static function getAllVersions()
{
$versions = array();
//$db = ZitDBAdapter::getDBAdapter();
$db = Zend_Registry::get('my_db2');
$v = new Versions($db);
$result = $v->fetchAll("active = 1");
foreach ($result as $row) {
switch (DB_TYPE) {
case 'mysql':
$version = new Version($row->version_id);
break;
case 'oci8':
$version = new Version($row->VERSION_ID);
break;
}
array_push($versions, $version);
}
return $versions;
}
示例3: checkVersion
public static function checkVersion($passVer)
{
$db = Zend_Registry::get('my_db');
$versions = new Versions($db);
$quoted = $db->quote($passVer);
$result = $versions->fetchAll("active = 1 and version_num = {$quoted}");
foreach ($result as $row) {
switch (DB_TYPE) {
case 'mysql':
if ($passVer == $row->version_num) {
return true;
}
break;
case 'oci8':
if ($passVer == $row->VERSION_NUM) {
return true;
}
break;
}
}
return false;
}
示例4: getZoneVersion
public static function getZoneVersion()
{
$db = Zend_Registry::get('my_db');
$v = new Versions($db);
$version_id = $_SESSION['ZONE_VERSION_ID'];
$result = $v->fetchAll("version_id = {$version_id}");
switch (DB_TYPE) {
case 'mysql':
$_SESSION['VERSION_NAMESPACE'] = $result[0]->version_namespace;
$_SESSION['ZONE_VERSION'] = $result[0]->version_num;
$_SESSION['ZONE_VERSION_DIRECTORY'] = $result[0]->version_directory;
$_SESSION['ZONE_VERSION_SCHEMA_DIR'] = $result[0]->schema_directory;
break;
case 'oci8':
$_SESSION['VERSION_NAMESPACE'] = $result[0]->VERSION_NAMESPACE;
$_SESSION['ZONE_VERSION'] = $result[0]->VERSION_NUM;
$_SESSION['ZONE_VERSION_DIRECTORY'] = $result[0]->VERSION_DIRECTORY;
$_SESSION['ZONE_VERSION_SCHEMA_DIR'] = $result[0]->SCHEMA_DIRECTORY;
break;
}
}