1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/manual/codes/Basic Components - Record - Creating new records.php

21 lines
294 B
PHP

<?php
$user = $conn->create("User");
// alternative way:
$table = $conn->getTable("User");
$user = $table->create();
// the simpliest way:
$user = new User();
// records support array access
$user["name"] = "John Locke";
// save user into database
$user->save();
?>