Archive for March, 2009

Export MySQL table to Excel file using php script

You might want to export your data to view in excel so is’t more read able rather than reading the result in a mysql console’s. here’s how.
First you need to change the configuration to work well.

<?php

/**
* @author sapta
* @copyright 2009
*/

$cdate = date("Y-m-d"); // get current date

// configuration
$mysql_host = ‘localhost’;
$mysql_user = ‘root’;
$mysql_pass = [...]

How to: Export MySQL data table to excel / csv format with SQL query

This tutorial will guide you to learn how to export data from MySQL table to the CSV (Comma-separated values) format. The CSV file format is a common file type that stores tabular data usually processed in applications like Microsoft Excel (XLS), each data separated with comma.
Export mysql data table to csv format using simple sql [...]