Db\Adapter::updateAsDict

public boolean updateAsDict (string $table, array $data, [string $whereCondition], [array $dataTypes])

Updates data on a table using custom RBDM SQL syntax Another, more convenient syntax

//Updating existing robot
 $success = $connection->updateAsDict(
 "robots",
 array(
      "name" => "New Astro Boy"
  ),
 "id = 101"
 );

 //Next SQL sentence is sent to the database system
 UPDATE `robots` SET `name` = "Astro boy" WHERE id = 101
doc_Phalcon
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.