<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends GSController { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see http://codeigniter.com/user_guide/general/urls.html */ public function index() { //$this->load->view('welcome_message'); $this->load->model("database/Mbatch"); $this->Mbatch = new Mbatch(); $this->Mbatch->start_date(date('2012-12-12')); //$this->Mbatch->SetWhereUpdate("batch_id", "php56"); $this->Mbatch->SetWhereUpdate("id", "21"); if($this->Mbatch->Update()){ echo "<pre> success</pre>"; }else{ //print_r($this->Mbatch); echo "<pre> Failed</pre>"; } /*$this->Mbatch=new Mbatch(); $this->Mbatch->batch_id("php56"); if($this->Mbatch->Select()){ //echo "<pre>",print_r($this->Mbatch,true),"</pre>"; } $this->Mbatch->GetAddForm(5,7);*/ $data=$this->Mbatch->Select('batch_id,batch_name','batch_id','DESC',10,0); //echo "<pre>",print_r($data,true),"</pre>"; } public function cup(){ GPrint("This is welcome"); } } /* End of file welcome.php */ /* Location: ./application/controllers/welcome.php */