Location: PHPKode > scripts > sql2excel > sql2excel/sql2excel.class.php
	 * @version V1.0 2002/July/18 (c) Erh-Wen,Kuo (hide@address.com). All rights reserved.
	 * Released under both BSD license and Lesser GPL library license. 
	 * Whenever there is any discrepancy between the two licenses, 
	 * the BSD license will take precedence. 
	 * purpose: providing a easy method to write mysql sql content to excel file format and stream
	 *          the output to user's browser directly.

	class Sql2Excel{
		var $db_host;
		var $db_user;
		var $db_pwd;
		var $db_name;
		var $db_query;
		/*Sql2Excel is class constructor
		  Return: None
		function Sql2Excel($db_host="localhost",$db_user="",$db_pwd="",$db_name="")
			//connect mysql database
			$this->db_link=mysql_pconnect($this->db_host,$this->db_user,$this->db_pwd) or die("Mysql database connecion failed!");
		}//Sql2Excel() END
		/*ExcelOutput() is the key method to let this class works
		  This method won't work if you have not include "excelgen.class.php" well.
		  Return: None
		function ExcelOutput($query="")
			//connect mysql database
			//get result
			// now we could construct Excel output
			}// for($i=0;...) END
			//create new instance of ExcelGen() class
			$excel = new ExcelGen("Sql2Excel");
			//initiate a counter for excel "ROW" counter
			//write fields to excel
			}// for($i=0;...) END
				//fetch each Cell($rowscounter,$colscounter) into Excel output stream
					//identify field type to descide how to write excel cell
				}//for($colscounter..) END
			}// while($row=mysql..) END
		}//ExcelOut() END		
	}//class Sql2Excel END
Return current item: sql2excel