1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/manual/codes/Working with objects - Component overview - Record - Creating new records.php
2007-02-23 20:57:38 +00:00

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();
?>