I have a custom module in a D7 installation.
In the submit function I’m doing the following:
my_custom_block_get_form_submit($form, &$form_state) {
$d = db_insert('db_launch')
->fields(array(
'uniq' => $uniq
))
->execute();
After executing the code, I get no errors in the error log, and the sites returns the standard “This website has encountered an error”.
Does anyone have idea how I can debug this? I tried a try catch block but that didn’t return anything.
Thanks,
To debug this code, you should try doing it this way:
Note that, this will return the query with placeholders. If you wish to obtain the queries with actual values, you should have
devel.moduleenabled and then: