How to check exec() if any error
How to check exec() if any error
vincmeister
Posts: 136Questions: 36Answers: 4
Hi,
I'm using datatables query to insert data
$aaa = $db
->query('insert', 'event_t_daftar')
->set('id_event_m',$id_event_m)
->set('event_m_nama',$event_m_nama)
->set('grup',$grup)
->set('nama_lengkap', $nama_lengkap)
->exec();
How to check if the insert is error and cancel the execution to database?
Please advise, thank you
Regards,
Danny
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi Danny,
It will throw an error, so you would need to try/catch it.
Allan