From Method

From method is part of Query Builder for selecting table with its alias. This method support chaining method.

Basic Usage

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

$this->db->from(string $table_name[, string $table_alias=""]): $this->db


This method has 1 required parameter and 1 optional parameter.


The $table_name value can contain string that refer to table name.


The $alias value can contain about string that aliased the value of $table_name. This value are required if using the Join Method .


Here is the example for from in a model class.

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