Exemplo n.º 1
0
<?php

include "mysql_excel.inc.php";
$import = new HarImport();
$import->openDatabase("sql.cityiper.it", "cityiper", "seru9583", "cityiper");
//To import the data from table
//$import->ImportDataFromTable("utenti-newsletter");
//To import the data from sql query
$sql = "select nome,cognome,cellulare from `utenti-newsletter`";
$import->ImportData($sql, "myXls.xls");
//To force to download
//$import->ImportDataFromTable("graduate","",true);
//Or
//$import->ImportData($sql,"myXls.xls",true);
Exemplo n.º 2
0
<?php 
include "../config.php";
include "xlgen/mysql_excel.inc.php";
$import = new HarImport();
$import->openDatabase($host, $user, $psw, $database);
//Importazione dati da query
$sql = "select * from `utenti`";
$import->ImportData($sql, "utenti.xls");
?>

<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=/s-admin/utenti.xls">

                    
Exemplo n.º 3
0
<?php

include "mysql_excel.inc.php";
$import = new HarImport();
$import->openDatabase("localhost", "root", "mamina", "ligm");
//To import the data from table
$import->ImportDataFromTable("documentation");
//To import the data from sql query
/*
	$sql="select r.user_name,p.amount from recruiter r ,payment p where p.user_name=r.user_name"
	$import->ImportData($sql,"myXls.xls");*/
//To force to download
//$import->ImportDataFromTable("graduate","",true);
//Or
//$import->ImportData($sql,"myXls.xls",true);