ORM Library for PHP and OCI8 library to convert from procedural programming to object oriented programming
- Put this folder in www folder
- Copy Config.php.example to Config.php and complete with correct credentials:
class Config { static $DB_HOST = 'localhost'; static $DB_PORT = '1521'; static $DB_USER = 'system'; static $DB_PASS = 'oracle'; static $DB_SID = 'xe'; }
- Run index.php
- Sample ORM query with this library
$db = new Database\Database; $user_id = 1; $result = $db->query("SELECT * FROM users WHERE id = :p1") ->bind(":p1", $user_id) ->execute() ->result(); print_r($result);