Insert records

Insert new records into a table

This version of the library is no longer maintained. Please consider upgrading to the latest release

Adding new records into a table is done using the insert method. The method accepts a single argument that represents a key => value mapped array where the key is the name of the column and value is the actual value that will be inserted into the column.

$result = $db->insert(array(
                'name' => 'John Doe',
                'email' => ''
INSERT INTO `users` (`name`, `email`) VALUES ("John Doe", "")

This method returns true on success and false otherwise.