1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/manual/docs/Working with objects - Component overview - Connection - Flushing the connection.php
2007-04-13 21:49:11 +00:00

15 lines
385 B
PHP

Creating new record (database row) is very easy. You can either use the Doctrine_Connection::create() or Doctrine_Table::create()
method to do this or just simple use the new operator.
<code type="php">
$user = new User();
$user->name = 'Jack';
$group = $conn->create('Group');
$group->name = 'Drinking Club';
// saves all the changed objects into database
$conn->flush();
</code>