PHP Classes

File: ExampleObject.php

Recommend this page to a friend!
  Classes of Indrek Altpere   ORM mapping class(like Hibernate), maps database table rows to objects   ExampleObject.php   Download  
File: ExampleObject.php
Role: Class source
Content type: text/plain
Description: example extending object
Class: ORM mapping class(like Hibernate), maps database table rows to objects
Store and retrieve objects in MySQL table records
Author: By
Last change: Unneeded & usage.
Date: 8 years ago
Size: 421 bytes
 

Contents

Class file image Download
<?php
class ExampleObject extends BaseObject {
    public function
GetTableName() {
        return
'exampleobjects';
    }
    public static function
ById($id) {
        return
self::GetById($id, __CLASS__);
    }
    public function
GetExample2s() {
       
$ex2proxy = new ExampleObject2();
        return
$ex2proxy->GetAllObjects('WHERE example_id="'.Mysql::EscapeString($this->IdValue()).'"');
    }
}
?>