本文整理匯總了PHP中Region::getNameById方法的典型用法代碼示例。如果您正苦於以下問題:PHP Region::getNameById方法的具體用法?PHP Region::getNameById怎麽用?PHP Region::getNameById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Region
的用法示例。
在下文中一共展示了Region::getNameById方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAllPaginated
public function getAllPaginated($start = 0, $pageSize = 20, $filter = "")
{
$theQuery = sprintf("SELECT `sights`.`id`,\n\t\t\t`sights`.`name`,\n\t\t\t`sights`.`description`,\n\t\t `sights`.`subcat_id`,\n\t\t\t`sights`.`validated`,\n\t\t\t`sights`.`address`,\n\t\t `sights_categories`.`id` as cat_id,\n\t\t `sights_categories`.`name` as cat_name,\n `localities`.`name` as loc_name,\n `localities`.`region_id` as region_id,\n `localities`.`latitudine` as latitude,\n `localities`.`longitudine`as longitude\n\t\t \tFROM `sights`\n\t\t LEFT JOIN `sights_categories`\n\t\t \tON `sights`.`cat_id` = `sights_categories`.`id`\n LEFT JOIN `localities`\n ON `sights`.`locality_id` = `localities`.`id`\n %s\n LIMIT %d, %d", $filter, $start, $pageSize);
$query = $this->db->query($theQuery);
$rez = [];
$sCat = new SightCategory();
$reg = new Region();
foreach ($query->result_array() as $row) {
$row["subcat_name"] = $sCat->getCategNameById($row["subcat_id"]);
$row["region"] = $reg->getNameById($row["region_id"]);
$rez[] = $row;
}
return $rez;
}
示例2: date
<h4><?php
echo CHtml::encode($data->getName());
?>
</h4>
</td>
<td>
<span><?php
echo CHtml::encode(Country::getNameById($data->city->countryId));
?>
</span>
<strong style="font-size: 15px;"><?php
echo CHtml::encode($data->city->name);
?>
</strong>
<span><?php
echo CHtml::encode(Region::getNameById($data->city->regionId));
?>
</span>
</td>
<td>
<h6><?php
echo CHtml::encode($data->scopeOfActivity->name);
?>
</h6>
<span>Регистрация на сайте с <span style="color:#A34747;"><?php
echo date('d.m.Y', strtotime($data->created_timestamp));
?>
г.</span></span>
</td>
<td class="left">
<span><?php