Faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 21 people (52%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How do i show the results of mysql in excel sheet using PHP?

Dec 16th, 2009 17:51
forum net tr, hotman .., engatoo engatoo, Roj Merry, osama said, seo webmaster, kaka vijes, i can do it, Vishal Rathod, amal k m, Deepak Bansal, Rachit Bagda, web developers and php programmers, shobhan challa, http://www.videotrutbe.com


define(db_host, "YOUR DATABASE HOST");
define(db_user, "USERNAME");
define(db_pass, "PASSWORD");
define(db_link, mysql_connect(db_host,db_user,db_pass));
define(db_name, "DB_NAME");
mysql_select_db(db_name);
/********************************************
Write the query, call it, and find the number of fields
/********************************************/
$select = "SELECT * FROM TABLE_NAME";				
$export = mysql_query($select);
$count = mysql_num_fields($export);
/********************************************
Extract field names and write them to the $header
variable
/********************************************/
for ($i = 0; $i < $count; $i++) {
	$header .= mysql_field_name($export, $i)."\t";
}
/********************************************
Extract all data, format it, and assign to the $data
variable
/********************************************/
while($row = mysql_fetch_row($export)) {
	$line = '';
	foreach($row as $value) {				
	Web design jaipur , efforts , web hosting jaipur , web solutions , web
design india
************************** Web design jaipur , efforts , web hosting
jaipur , web solutions , web design india
******************************************************** Web design
jaipur , efforts , web hosting jaipur , web solutions , web design india
****************************
Web design jaipur , efforts , web hosting jaipur , web solutions , web
design india
Web design jaipur , efforts , web hosting jaipur , web solutions , web
design india
full program full oyun http://www.forumnettr.com
full forum http://www.forumnettr.com/forum 
secilmis youtube videolari http://www.youtubevideolari.net youtube videos
online video tr tube http://www.videotrtube.com
firmalar sirketler rehberi http://www.sirketfirmarehberi.com firma
sirket rehberi adres telefon bilgileri
online vieo izle videoturk izle http://www.videoturk.gen.tr