Select AS Method

The select_as method is part of Query Builder for selecting column data into a table with its aliases.

Basic Usage

Here is the basic usage select_as method from $db property on SENE_Model class.

$this->db->select_as(string $col_name, string $alias [, bool $is_esc=0]): $this->db


Update method has 2 required parameters and 1 optional parameter.


The $col_name value can be a single column name or can be filled with wildcard "*", or can be filled with MySQL function.


The $alias value can be a string that represent the selected column.


The $is_esc value can be a boolean, if 1 all value are escaped otherwise unescaped.


For the example we assumed want to select a colum in a table with select_as method.

class Blog_Model extends SENE_Model{
  var $tbl = 'blog';
  var $tbl_as = 'b';
  public function __construct(){
  public function countPublished(){
    return $this->db->get_first();