本文整理汇总了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