PHP Classes

File: Classes/Linit.php

Recommend this page to a friend!
  Classes of Juan Camilo López   Lapi   Classes/Linit.php   Download  
File: Classes/Linit.php
Role: Example script
Content type: text/plain
Description: all files
Class: Lapi
Query MySQL database from parameter lists
Author: By
Last change:
Date: 13 years ago
Size: 1,255 bytes
 

Contents

Class file image Download
<?php
/**
 * Creo los includes para ingresar todas las clases
 */
include_once '../config/Lconfig.php';
include_once
'Ldatabase.php';
include_once
'Errors.php';
include_once
'Redirect.php';
include_once
'Lfolder.php';
include_once
'LSwiftAdapter.php';
include_once
'Ltable.php';
$conf = new Lconfig();
/**
 * Configuro la clase para enviar emails
 * @var unknown_type
 */
$mailer = new Lmail();
/**
 * Forma de enviar mails
 */
/*$mailer->setBody('salvacion.html',true);
$mailer->setFrom(array('lopezquekk@gmail.com'=>'Camilo'));
$mailer->setTo(array('lopezquekk@hotmail.com'=>'Lopez'));
$mailer->setSubject('Prueba',true);
$mailer->send();*/

/*$data = array(
    "{nombre}"=>'camilo123'
);*/

/**
 * Se conecta a la base de datos inmediatamente
 */
$db = new Ldatabase();

/**
 * Como hacer un insert
 */
/*$datadb = array(
    "nombre"=>'camilo123'
);*/
//$db->insert('pruebas',$datadb,'update','id=2');
//$db->delete('pruebas');

//Asi se consulta de una tabla
/*$db->get('pruebas');
while ($res = $db->get_results()){
    echo $res->nombre.'<br />';
}*/
$db->get('pruebas');

$tb = new Ltable();
$tb->showCommands = true;
$tb->createSqlTable($db->sqlToTable(),'Eliminar,Modificar,Codigo,Nombre');


?>