PHP Classes

File: example_connect_to_db.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Evert Ulises German Soto  >  PDO Multi Connection Class  >  example_connect_to_db.php  >  Download  
File: example_connect_to_db.php
Role: Example script
Content type: text/plain
Description: example_connect_to_db.php
Class: PDO Multi Connection Class
Access different types of SQL database using PDO
Author: By
Last change:
Date: 3 years ago
Size: 396 bytes


Class file image Download

$db = new wArLeY_DBMS("mysql", "", "test", "root", "", "");
$dbCN = $db->Cnxn(); //This step is really neccesary for create connection to database, and getting the errors in methods.
if($dbCN==false) die("Error: Cant connect to database.");
$db->getError(); //Show error description if exist, else is empty.