Reputation: 1695
I am using phalcon framework for a project.I am trying to insert data to a table.But it is not working and also not showing any error.Here is my code example..
$tableData = array(
'field1' => 'field1',
'field2' => 'field2',
'field3' => 'field3',
'field4' => 'field4',
'field5' => 'field5'
);
$table= new Table();
$table->save($tableData);
I have used wrong field name to see the error of query.But it is not any error or any message and also not inserting data to the database.
Please help me to find out the problem..
Thanks
Upvotes: 2
Views: 388
Reputation: 707
most probably you are facing not null validation error
add this code index.php
\Phalcon\Mvc\Model::setup([
'notNullValidations' => false
]);
then you will find the error.and solve it. Thanks
Upvotes: 2