Remove dependency on sql_insert()