From Method

From method is part of database class builder for selecting table with its alias.


Update method has 2 required parameters that is table name and table alias. Table alias are required for using join and join_method

$this->db->from(string $table_name, string $table_alias): object


Table Name refer to table name.


Alias Aliased name of $table_name.

Example usage

Here is the examples using select method. See the first of this page for full example.

Basic Usage

For example we assumed want to add new data in blog table. First, in the model:

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