PHP Classes

File: usage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Tufan Baris YILDIRIM  >  DB Engine  >  usage.php  >  Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: Example basic using.
Class: DB Engine
Database abstraction layer for many databases
Author: By
Last change:
Date: 4 years ago
Size: 1,822 bytes


Class file image Download
include 'db_engine.php';
  * Mysql Connection
  * @var sqlEngine
$mysql=new dbEngine(DB_MYSQL);
  * Oracle Connecton
  * @var sqlEngine
$oracle=new dbEngine(DB_ORACLE);
$oracle->count('patienst',"where name='TUFAN BARIS' and surname='YILDIRIM'");
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>D3 Grid Usage Example</title>
<meta name="description" content="Example about Sql Engine">
<meta name="author" content="Tufan Baris YILDIRIM">
<link href="img/d3_grid.css" rel="stylesheet" type="text/css">
->query("select * from firmalar limit 10");
      * public $tableStart = "<table class=\"d3_grid\">\n",
      * $headerCellTemplate = '<td>{$caption}</td>',
      * $headerTemplate = "<tr>{\$header}</tr>\n",
      * $cellTemplate = '<td>{$cellValue}</td>',
      * $rowTemplate = "<tr>{\$cells}</tr>\n",
      * $tableEnd = "</table>",
      * $tableTemplate = '{$tableStart}{$content}{$tableEnd}',
      * $displayError = true;
function rowStyler($ref){
$mysql->grid()->rowTemplate='<tr class="row'.($ref['d3Rownum']%2).'">{$cells}</tr>'."\n";

$mysql->grid()->captions=array('id'=>'S&#305;ra No');
$mysql->grid()->headerTemplate='<tr class="thead">{$header}</tr>';
$mysql->grid()->nullValue='<span class="null">null</span>';