I'm building a query and using "execute" for a multiple insert like :
$sql='INSERT INTO tablename (col1, col2, col3) VALUES (?, ?, ?), (?, ?, ?)'
$stmt = $contactsTable->getAdapter()->prepare($sql);
$stmt->execute();
It all works fine if all the data is not empty, but if some values are empty, I get an error like this:
Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I set the columns that are not requied to null:yes and default:NULL . I heard of a setting like "setIntegrityCheck(false)", but I'm not sure if that's what I need.
Thanks