PHP Script for Converting MySQL Data to MS EXCEL File .xls format

3 02 2011

$host = ‘HOST_NAME’;
$user = ‘DB_USER’;
$pass = ‘DB_USER_PASS’;
$db = ‘DB_NAME’;
$table = ‘TABLE_NAME’;
$file = ‘FILE_NAME’;

$query  = “SELECT * FROM “.$table.”";
$result = mysql_query($query) or die(‘Error, query failed’);

$tsv  = array();
$html = array();
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$tsv[]  = implode(“\t”, $row);
$html[] = “<tr><td>” .implode(“</td><td>”, $row) .              “</td></tr>”;
}

$tsv = implode(“\r\n”, $tsv);
$html = “<table>” . implode(“\r\n”, $html) . “</table>”;

$fileName = ‘mysql-to-excel.xls’;
header(“Content-type: application/vnd.ms-excel”);
header(“Content-Disposition: attachment; filename=$fileName”);

print $tsv;
exit;





PHP Script for Converting MySQL Data to Comma Delimited CSV File

3 02 2011

There are many reasons you could want to convert a MySQL database to a comma deliminated CSV file.
This Script help you …

$host = 'HOST_NAME';
$user = 'DB_USER';
$pass = 'DB_USER_PASS';
$db = 'DB_NAME';
$table = 'TABLE_NAME';
$file = 'FILE_NAME';


$link = mysql_connect($host, $user, $pass) or die("Can not connect." . mysql_error());
mysql_select_db($db) or die("Can not connect.");

$result = mysql_query(“SHOW COLUMNS FROM “.$table.”");
$i = 0;
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$csv_output .= $row['Field'].”; “;
$i++;
}
}


$csv_output .= "\n";

$values = mysql_query(“SELECT * FROM “.$table.”");
while ($rowr = mysql_fetch_row($values)) {
for ($j=0;$j < $i;$j++) {
$csv_output .= $rowr[$j].”; “;
}
$csv_output .= “\n”;
}


$filename = $file."_".date("Y-m-d_H-i",time());
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");
print $csv_output;
exit;





45000 baby names list in .CSV,.XLS & .SQL file format

3 02 2011

I collected about 45000 baby names,gender, meanings of those names, origin,alternative origin and other details.

I collect those data from different web site by web scraping script.

Here all data are in three separate formats: MySQL, MS Excel & .CSV
It can be used to create a baby names directory. Or application for Iphone,android or any platform related with baby name directory ..

Total price of the database is $59 USD.

To view this product Click here..

In freelancer there is a problem (this link doesnot work now) ..You couldn’t downloads or buy from free-market.(already 2 sold from here)

So it is better for you to buy directly from me ..

You can buy it directly from me after contacting me … or you can hire me at odesk ..then pay me ..After contract started I will send you the Database file. (Here also 3 times sold by this way)





Sidebar ads widget plugin

5 09 2010

The Sidebar ads Upload Plugin for uploads ads with icon images,text & target link

You can manage your sidebar ads from wp admin panel..
Here you can …
1. Uploads ads with icon images, text,target link,ads display order..
2. Edit or delete your ads .
3. Can change display order.

When you install Sidebar ads widget plugin then ..You get …
An admin control panel of yours ads ..where you can upload new ads,edit,delete,set order.

You get a widget which can drag & drop into your sidebar…

 

You can View the product here





oDesk Certificate

2 05 2010

oDesk Certified oDesk Professional








Follow

Get every new post delivered to your Inbox.