Inserts a new record into the table.
Parameters
- $data
array
$data Associative array of values with keys matching the names of table fields.
- $type
integer
$type Execution mode for SQL query INSERT: 0: query is executed without
additional conditions (default mode) 1: query is executed with condition ON
DUPLICATE KEY UPDATE 2: query is executed with key word IGNORE
Returns
resource|integer|boolean
Returns result object or id of newly added record (if id field has
AUTO_INCREMENT property) or true (if there are no data to be inserted)
Overrides