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

21 lines
300 B
PHP
Raw Normal View History

2006-07-24 01:08:06 +04:00
<?php
$user = $session->create("User");
// alternative way:
$table = $session->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();
?>