PHP Classes

File: mysql_cnstr.php

Recommend this page to a friend!
  Classes of Alessio Maria Braccini  >  mysqlc  >  mysql_cnstr.php  >  Download  
File: mysql_cnstr.php
Role: Configuration script
Content type: text/plain
Description: Class constructor
Class: mysqlc
MySQL database access wrapper
Author: By
Last change:
Date: 11 years ago
Size: 390 bytes


Class file image Download

require "mysqlc.php";

// 'xxx' and 'yyy' must be valid username and password for you MySQL server

$host = 'localhost';
$user = 'xxx';
$pass = 'yyy';
$arrt = 2;
$pers = false;
$dbname = 'mysql';

$db = new c_mysql($user, $pass, $host, $dbname, $arrt, $pers);

if (
$db->stat == False)
"Database connection not available"); /* Modify here for mail notification on errors */