PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Patrick Frey   myDBQuery   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Examle File
Class: myDBQuery
MySQL query wrapper with source tracking on error
Author: By
Last change:
Date: 18 years ago
Size: 531 bytes


Class file image Download

// Create MySQL Connection
$dbuser = "user";
$dbpass = "pass";
$dbname = "database";
$dbserver = "hostname";
$db = mysql_connect($dbserver,$dbuser,$dbpass);

// include class
include_once 'class.mydbq.php';

// load MyDBQ class
$mydbq = new myDBQuery();

// Example without debuging
list($res, $num) = $mydbq->mydbq("SELECT * FROM table");

// Example with debuging
list($res, $num) = $mydbq->mydbq("SELECT * FROM table",__FILE__, __LINE_);

// Thats all folks!