mikecao/sparrow — pull request #5 by galic (2013-06-13 16:18:42+00:00)
Title: fixed some bugs

fixed some bugs.
issue:
table structure:
CREATE TABLE `table1` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(25),
`rating` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

if use insert function:
$db=new Sparrow();
...
$db->from('table1')->insert('name'=>'my name','rating'=>null)->execute(); // fail!!!
echo $db->from('table1')->insert('name'=>'my name')->sql();
// output: insert table1 (name,rating) values ('my name',''); // rating init empty string!
after fixed output sql statement:
insert table1 (name,rating) values ('my name',null)