Script Baba
Most cost effective and valuable scripts that require almost ZERO setup...
  Home » About us » Contact us » Terms » Support center » Customer Download area         We Provide full support even if you are single dollar script Buyer...

SQL to CSV Exporter

Price $10 USD         No demo available


3 In 1 product. A simple include written in PHP 4, and is compatible with almost all versions of PHP >= 4.

It does not accept a table or single level input, but accepts SQL Query, and dumps the result in CSV which is readable by almost all Spreadsheet / Worksheet software, such as Microsoft Excel, Open Office, Start Office etc; and even the file can easily be viewed using simplest text editor like notepad for windows.

Supported SQL Servers

It supports 3 servers rightnow:

  • MySQL (All versions)
  • Microsoft SQL Server (All versions)
  • Postgre SQL Server (All versions)


A simplest example of dumping mysql query to CSV will be:

<?php

   $conn = mysql_connect("localhost","root","root");
   mysql_select_db("employees_Db",$conn);

   include ("sql2csv.php");
   $m = new sql2csv( MYSQL );
   $m->execute("SELECT * FROM employees",$conn);

   $m->downloadCSV("example3.csv");

   mysql_close();

?>



5 examples are included in the pack.


Please review our Terms page before purchasing.