Db\Adapter::insert

public boolean insert (string | array $table, array $values, [array $fields], [array $dataTypes])

Inserts data into a table using custom RDBMS SQL syntax

// Inserting a new robot
 $success = $connection->insert(
 "robots",
 array("Astro Boy", 1952),
 array("name", "year")
 );

 // Next SQL sentence is sent to the database system
 INSERT INTO `robots` (`name`, `year`) VALUES ("Astro boy", 1952);
doc_Phalcon
2016-10-16 09:48:52
Comments
Leave a Comment

Please login to continue.