예제 #1
0
 public function index05Action()
 {
     $table = "user";
     $adapter = $this->getServiceLocator()->get("db_books");
     $tableGateway = new TableGateway($table, $adapter);
     $insertObj = new Insert("user");
     $insertObj->columns(array("name", "email"))->values(array("name" => "Armasky", "email" => "*****@*****.**"));
     $tableGateway->insertWith($insertObj);
     //last record inserted
     echo $tableGateway->getLastInsertValue();
     return false;
 }