PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 10 years ago
Size: 531 bytes
 

Contents

Class file image Download
<?

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




// 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!
?>