Welcome Guest, Not a member yet? Register   Sign In
Insert using class
#1

/*
class Myclass {
       public $title = 'My Title';
       public $content = 'My Content';
       public $date = 'My Date';
}
*/

$object = new Myclass;
$this->db->insert('mytable', $object);

So like this i can do insert, but if i i want to  use input-post function with my variables
like this:  public $title = $this->input->post('some'); how i can do this?
Reply


Messages In This Thread
Insert using class - by Sonny - 05-17-2016, 02:23 AM
RE: Insert using class - by Wouter60 - 05-17-2016, 12:21 PM
RE: Insert using class - by Sonny - 05-18-2016, 01:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB