Select Method

Select method is part of database class builder for selecting column data into a table.


Update method has 1 required parameters that is column name and value, another parameters are optional. Here is the completed parameters can be used by where methods

$this->db->select(string $column_name): dbObject


Column Name can be single column name, or can be filled with wildcard "*".

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 getList(){
    return $this->db->get();
  public function getById($id){
    return $this->db->get_first();

at the controller, we assumed has file named blog.php

class Blog extends Sene_Controller{
  public function __construct(){
    $this->load('blog_model','bm'); #class scope model
  public function index(){
    $blogs = $this->bm->getList();
  public function detail($id){
    $blog = $this->bm->getById($id);