To insert SQL NULL or any other expression, you can use the Zend_Db_Expr object. Even if you use quote() , ZF passes these objects through unquoted.
$null = new Zend_Db_Expr("NULL"); $table = new MyTable(); $table->insert(123, "abc", $null);
Please note that since using Zend_Db_Expr circumvents both quoting and parameterization, you are responsible for protecting against SQL injection.
This is for your question, but consider LOAD DATA INFILE if you are uploading a large download CSV file. This can be 20 times faster than using multiple INSERT lines.
source share