本文整理汇总了PHP中Base_module_model::list_items方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_module_model::list_items方法的具体用法?PHP Base_module_model::list_items怎么用?PHP Base_module_model::list_items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base_module_model
的用法示例。
在下文中一共展示了Base_module_model::list_items方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_items
/**
* Lists the page variables (not displayed in the CMS)
*
* @access public
* @param int The limit value for the list data (optional)
* @param int The offset value for the list data (optional)
* @param string The field name to order by (optional)
* @param string The sorting order (optional)
* @param boolean Determines whether the result is just an integer of the number of records or an array of data (optional)
* @return mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)
*/
public function list_items($limit = NULL, $offset = NULL, $col = 'location', $order = 'desc', $just_count = FALSE)
{
$this->db->select($this->_tables['fuel_pagevars'] . '.*, ' . $this->_tables['fuel_pages'] . '.layout, ' . $this->_tables['fuel_pages'] . '.location, ' . $this->_tables['fuel_pages'] . '.published AS page_published');
$this->db->join($this->_tables['fuel_pages'], $this->_tables['fuel_pages'] . '.id = ' . $this->_tables['fuel_pagevars'] . '.page_id', 'left');
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例2: SUBSTRING
function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'asc')
{
$this->db->join('authors', 'authors.id = articles.author_id', 'left');
$this->db->select('articles.id, authors.name AS author, title, SUBSTRING(content, 50) AS content, DATE_FORMAT(date_added,"%m/%d/%Y") as date_added, articles.published', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例3:
function list_items($limit = NULL, $offset = NULL, $col = 'date_added', $order = 'desc')
{
$this->db->select($this->_tables['blog_comments'] . '.id, title AS post_title, ' . $this->_tables['blog_comments'] . '.content AS comment, author_name AS comment_author_name, DATE_FORMAT(' . $this->_tables['blog_comments'] . '.date_added,"%m/%d/%Y %h:%i %p") as date_added, ' . $this->_tables['blog_comments'] . '.published', FALSE);
$this->db->join($this->_tables['blog_posts'], $this->_tables['blog_comments'] . '.post_id = ' . $this->_tables['blog_posts'] . '.id', 'inner');
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例4: list_items
/**
* Lists the log items
*
* @access public
* @param int The limit value for the list data (optional)
* @param int The offset value for the list data (optional)
* @param string The field name to order by (optional)
* @param string The sorting order (optional)
* @param boolean Determines whether the result is just an integer of the number of records or an array of data (optional)
* @return mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)
*/
public function list_items($limit = NULL, $offset = NULL, $col = 'entry_date', $order = 'desc', $just_count = FALSE)
{
$this->db->select($this->_logs_table . '.id, entry_date, CONCAT(' . $this->_tables['fuel_users'] . '.first_name, " ", ' . $this->_tables['fuel_users'] . '.last_name) as name, message, type', FALSE);
$this->db->join($this->_tables['fuel_users'], $this->_logs_table . '.user_id = ' . $this->_tables['fuel_users'] . '.id', 'left');
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例5: CONCAT
function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'asc', $just_count = FALSE)
{
$this->db->select('fuel_blog_users.id, CONCAT(first_name, " ", last_name) as name, display_name, fuel_blog_users.active', FALSE);
$this->db->join('fuel_users', 'fuel_users.id = fuel_blog_users.fuel_user_id', 'left');
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例6: CONCAT
function list_items($limit = NULL, $offset = NULL, $col = 'date_added', $order = 'desc')
{
$this->db->select($this->_tables['blog_posts'] . '.id, title, CONCAT(' . $this->_tables['users'] . '.first_name, " ", ' . $this->_tables['users'] . '.last_name) AS author, DATE_FORMAT(' . $this->_tables['blog_posts'] . '.date_added,"%m/%d/%Y") as date_added, ' . $this->_tables['blog_posts'] . '.published', FALSE);
$this->db->join($this->_tables['users'], $this->_tables['users'] . '.id = ' . $this->_tables['blog_posts'] . '.author_id', 'left');
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例7:
function list_items($limit = NULL, $offset = NULL, $col = 'id', $order = 'asc')
{
$this->db->join('wa_items', 'wa_items.id = wa_auctions.item_id', 'left');
$this->db->join('wa_users', 'wa_users.id = wa_auctions.seller', 'left');
$this->db->select('wa_auctions.id, wa_auctions.item_id, wa_users.username AS seller, wa_auctions.price, wa_items.name AS name, wa_items.damage AS damage, wa_auctions.quantity, wa_auctions.started', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例8: list_items
/**
* Lists the module's items
*
* @access public
* @param int The limit value for the list data (optional)
* @param int The offset value for the list data (optional)
* @param string The field name to order by (optional)
* @param string The sorting order (optional)
* @param boolean Determines whether the result is just an integer of the number of records or an array of data (optional)
* @return mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)
*/
public function list_items($limit = NULL, $offset = NULL, $col = 'nav_key', $order = 'desc', $just_count = FALSE)
{
$table = $this->table_name();
$this->db->select($table . '.id, ' . $table . '.name, ' . $table . '.slug, ' . $table . '.context, p.name as parent_id, ' . $table . '.precedence, ' . $table . '.published', FALSE);
$this->db->join($table . ' AS p', $this->tables('fuel_categories') . '.parent_id = p.id', 'left');
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例9:
function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'asc')
{
$this->db->where(array('id !=' => 1));
// Uncategorized category
$this->db->select('id, name, published');
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例10: list_items
public function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'desc')
{
$this->db->select('id, name, SUBSTRING(description, 1, 50) as description, SUBSTRING(view, 1, 150) as view, published', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
foreach ($data as $key => $val) {
$data[$key]['view'] = htmlentities($val['view'], ENT_QUOTES, 'UTF-8');
}
return $data;
}
示例11: array
function list_items($limit = NULL, $offset = NULL, $col = 'post_date', $order = 'desc', $just_count = FALSE)
{
// set the filter again here just in case the table names are different
$this->filters = array('title', 'content_filtered', $this->_tables['fuel_users'] . '.first_name', $this->_tables['fuel_users'] . '.last_name');
$this->db->select($this->_tables['blog_posts'] . '.id, title, CONCAT(' . $this->_tables['fuel_users'] . '.first_name, " ", ' . $this->_tables['fuel_users'] . '.last_name) AS author, ' . $this->_tables['blog_posts'] . '.post_date, ' . $this->_tables['blog_posts'] . '.published', FALSE);
$this->db->join($this->_tables['fuel_users'], $this->_tables['fuel_users'] . '.id = ' . $this->_tables['blog_posts'] . '.author_id', 'left');
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例12: list_items
/**
* Lists the site variable items
*
* @access public
* @param int The limit value for the list data (optional)
* @param int The offset value for the list data (optional)
* @param string The field name to order by (optional)
* @param string The sorting order (optional)
* @param boolean Determines whether the result is just an integer of the number of records or an array of data (optional)
* @return mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)
*/
public function list_items($limit = NULL, $offset = NULL, $col = 'name', $order = 'desc', $just_count = FALSE)
{
$this->db->select('id, name, SUBSTRING(value, 1, 50) as value, scope, active', FALSE);
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
if (empty($just_count)) {
foreach ($data as $key => $val) {
$data[$key]['value'] = htmlentities($val['value'], ENT_QUOTES, 'UTF-8');
}
}
return $data;
}
示例13:
function list_items($limit = NULL, $offset = NULL, $col = 'email', $order = 'desc')
{
$CI =& get_instance();
$user = $CI->fuel_auth->user_data();
if (!$CI->fuel_auth->is_super_admin()) {
$this->db->where(array('super_admin' => 'no'));
}
$this->db->select('id, email, user_name, first_name, last_name, super_admin, active');
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
示例14: list_items
/**
* Lists the module's items
*
* @access public
* @param int The limit value for the list data (optional)
* @param int The offset value for the list data (optional)
* @param string The field name to order by (optional)
* @param string The sorting order (optional)
* @param boolean Determines whether the result is just an integer of the number of records or an array of data (optional)
* @return mixed If $just_count is true it will return an integer value. Otherwise it will return an array of data (optional)
*/
public function list_items($limit = NULL, $offset = NULL, $col = 'nav_key', $order = 'desc', $just_count = FALSE)
{
$CI =& get_instance();
if ($CI->fuel->language->has_multiple()) {
$this->db->select('id, label, if (nav_key != "", nav_key, location) AS location, precedence, language, hidden, published', FALSE);
} else {
$this->db->select('id, label, if (nav_key != "", nav_key, location) AS location, precedence, hidden, published', FALSE);
}
$data = parent::list_items($limit, $offset, $col, $order, $just_count);
return $data;
}
示例15: array
function list_items($limit = NULL, $offset = NULL, $col = 'date_added', $order = 'desc')
{
// set the filter again here just in case the table names are different
$this->filters = array('title', 'content_filtered', $this->_tables['users'] . '.first_name', $this->_tables['users'] . '.last_name');
$this->db->select($this->_tables['blog_posts'] . '.id, title, CONCAT(' . $this->_tables['users'] . '.first_name, " ", ' . $this->_tables['users'] . '.last_name) AS author, ' . $this->_tables['blog_posts'] . '.date_added, ' . $this->_tables['blog_posts'] . '.published', FALSE);
$this->db->join($this->_tables['users'], $this->_tables['users'] . '.id = ' . $this->_tables['blog_posts'] . '.author_id', 'left');
$data = parent::list_items($limit, $offset, $col, $order);
foreach ($data as $key => $val) {
$data[$key]['date_added'] = english_date($data[$key]['date_added'], TRUE);
}
return $data;
}