本文整理匯總了PHP中PearDatabase::fetch_array方法的典型用法代碼示例。如果您正苦於以下問題:PHP PearDatabase::fetch_array方法的具體用法?PHP PearDatabase::fetch_array怎麽用?PHP PearDatabase::fetch_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PearDatabase
的用法示例。
在下文中一共展示了PearDatabase::fetch_array方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTreeDetails
function getTreeDetails()
{
if (count(self::$treeDetails) > 0) {
return self::$treeDetails;
}
$result = $this->pearDB->pquery('SELECT module FROM vtiger_trees_templates WHERE templateid = ?', [$this->getFieldParams()]);
$module = $this->pearDB->getSingleValue($result);
$moduleName = getTabModuleName($module);
$result = $this->pearDB->pquery('SELECT tree,label FROM vtiger_trees_templates_data WHERE templateid = ?', [$this->getFieldParams()]);
while ($row = $this->pearDB->fetch_array($result)) {
self::$treeDetails[$row['tree']] = getTranslatedString($row['label'], $moduleName);
}
return self::$treeDetails;
}
示例2: getFieldTypeFromUIType
private function getFieldTypeFromUIType()
{
// Cache all the information for futher re-use
if (empty(self::$fieldTypeMapping)) {
$result = $this->pearDB->pquery("select * from vtiger_ws_fieldtype", array());
while ($resultrow = $this->pearDB->fetch_array($result)) {
self::$fieldTypeMapping[$resultrow['uitype']] = $resultrow;
}
}
if (isset(WebserviceField::$fieldTypeMapping[$this->getUIType()])) {
if (WebserviceField::$fieldTypeMapping[$this->getUIType()] === false) {
return null;
}
$row = WebserviceField::$fieldTypeMapping[$this->getUIType()];
return $row['fieldtype'];
} else {
WebserviceField::$fieldTypeMapping[$this->getUIType()] = false;
return null;
}
}