PHP Classes

File: prepare_select.php

Recommend this page to a friend!
  Classes of Marcelo Costa   ooeLite   prepare_select.php   Download  
File: prepare_select.php
Role: Example script
Content type: text/plain
Description: prepare sql exemple
Class: ooeLite
Web application development framework
Author: By
Last change:
Date: 14 years ago
Size: 686 bytes
 

Contents

Class file image Download
<?php
include_once ("_autoload.php");
##################################
# Exemplo de uso
/*
Simple prepare and get a array result form select query,
suport return a line array , associtative and simple row

*/

$teste = new ooeLite;
try {
// Tradicional method

$SQL="SELECT * FROM acs_usuarios";
$teste->prepareSQL($SQL);

// Options :

// complete associative array
print_r($teste->getAssocArray());

// One line off associative array
//print_r($teste->getLineArray());

// simple row , default row=0
//print_r($teste->getRow());

// row = 2
//print_r($teste->getRow(2));


} catch (Exception $e) {
echo
$SQL . " => mensagem => " . $e->getMessage()." => Erro => ".$e->getCode;
}

?>