i have the following table:
table_1
id int(11) PK NOT NULL
name VARCHAR(11)
Note; id is not auto_increment
When i tried to insert:
$this->db->begin();
try{
$entry = new Table1();
$entry->name = 'Juan';
if(!$entry->save()){
$this->db->rollback();
echo $entry->getMessage(); //no error
}
}catch(Exception $e){
echo $e->getMessage(); //no error
$this->db->rollback();
}catch(\Phalcon\Mvc\Model\Exception $x){
echo $x->getMessage(); //no error
$this->db->rollback();
}catch(\PDOException $r){
echo $r->getMessage(); //no error
$this->db->rollback();
}
$this->db->commit();
I expect an error because i didn't define id, id is not auto increment, however, php doesn't give me anything. Please help.
The entry was not inserted btw.