PHP Classes

File: test_gendata.php

Recommend this page to a friend!
  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: 15 years ago
Size: 1,377 bytes


Class file image Download

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';
// --------------------------------------------------//


$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->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 )";