PHP Classes

File: example_update.php

Recommend this page to a friend!
  Classes of Evert Ulises German Soto   PDO Multi Connection Class   example_update.php   Download  
File: example_update.php
Role: Example script
Content type: text/plain
Description: example_update.php
Class: PDO Multi Connection Class
Access different types of SQL database using PDO
Author: By
Last change:
Date: 10 years ago
Size: 587 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.

$db->query("UPDATE TB_USERS SET NAME='wArLeY996',COMPANY='Freelancer MX' WHERE ID=1;");
$getAffectedRows = $db->update("TB_USERS", "NAME='Bling_Grillz',COMPANY='Freelancer MX'", "ID=2");