PHP Classes
elePHPant
Icontem

File: test_gendata.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Horacio Herrera  >  Gendata ODBC Text  >  test_gendata.php  >  Download  
File: test_gendata.php
Role: Example script
Content type: text/plain
Description: File to test the class
Class: Gendata ODBC Text
Display database query results in CSV using ODBC
Author: By
Last change:
Date: 8 years ago
Size: 1,377 bytes
 

Contents

Class file image Download
<?Php

/****
Procedimiento test_gendata.php
Autor: Horacio M. Herrera
Fecha: 20/04/2007
Propósitpo: Efectuar una prueba de la clase GENDATA_ODBC_TEXT

Explanation This file can be used to test the class
                To do this, you only should replace class variables written below with your desired values
*/

// --------------------------------------------------//
$Titulo = 'Probar Gendata';
// --------------------------------------------------//

require('./gendata_odbc_text.php');

$cr = "\n";
$fs = '","';

// Abrir una instancia de la clase / Open an instance of the class
$A=new MyDataText();
$A->DBuser = "myDbUser"; // Usuario de la conexión / User to connect the database
$A->DBpassword = "myDBpassord"; // Contraseña del Usuario / Password that uses to connect database
$A->DSN = "myDSN"; // DSN que se usará en la conexión / DSN that uses to connect database
$A->def_sep = "|"; // Separador de campos (Defecto = ";") / Field separator (default = ";")

$A->nomBloque = "First Block"; // Nombre del bloque de datos
// The query string.
$A->SqlString = "SELECT * FROM mytable ORDER BY 1";
$A->DoText();

$A->nomBloque = "Second Block"; // Nombre del bloque de datos
// The query string. It may be a stored procedure
$A->SqlString = "EXECUTE PROCEDURE sp_myproc( mypar1 , mypar2 , mypar3 )";
$A->DoText();


?>