PHP Classes

File: examples/orm/example2.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/orm/example2.php   Download  
File: examples/orm/example2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 369 bytes
 

Contents

Class file image Download
<?php

include('../config.php');
include(
'orm_config.php');
#include('JoinPostMapper.php');
#include('UserMapper.php');
#include('DomainObjects.php');

$mapper = new JoinPostMapper($db);

$user = $mapper->find(2);
$user->body = 'This is the old body';
p($user);
$user->body = 'This is the new body';
$mapper->update($user);
p($user);
$user = $mapper->find(2);
p($user);