Skip to content

Instantly share code, notes, and snippets.

@renepardon
Created September 3, 2011 10:45
Show Gist options
  • Select an option

  • Save renepardon/1190999 to your computer and use it in GitHub Desktop.

Select an option

Save renepardon/1190999 to your computer and use it in GitHub Desktop.
ORM or just Zend_Db_Tabble?
<?php
$this->_em->setTable('user'); // Sets DbTable-class to use.
$users = $this->_em->findById(1); // Returns a collection of users found.
$user = $users->first(); // Get only the first user.
$user->setFirstname('Max');
$user->setLastname('Mustermann');
$this->_em->save($user); // Update user information.
@renepardon
Copy link
Copy Markdown
Author

Mh, stimmt. Fluent interface und so :)
save() hingegen kann bisher nur eine Änderung speichern. Vorerst müsste das reichen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment