Login   Register  
PHP Classes
elePHPant
Icontem

File: executeSql.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Marcelo Costa  >  ooeLite  >  executeSql.php  >  Download  
File: executeSql.php
Role: Example script
Content type: text/plain
Description: execute sql exemple
Class: ooeLite
Web application development framework
Author: By
Last change:
Date: 2009-07-10 11:15
Size: 596 bytes
 

Contents

Class file image Download
<?php
include_once ("_autoload.php");
##################################
/*
executeSql are simple execute sql and retrived a result 
for query type :

Select return associative array

Insert return a insert ID or null if table not are autoincrement value

Update and Delete return afect rows and need a where clause for runing

*/
$teste = new ooeLite;
try {

//teste error

// $SQL="SELECT * FROM tablenotexist";

$SQL="SELECT * FROM acs_usuarios";
var_export($teste->executeSql($SQL));
} catch (
Exception $e) {
echo 
$SQL " => mensagem => " $e->getMessage()." => Erro => ".$e->getCode;
}

?>