Posts Under 'CSV'

How to export mysql table data into csv file using php

This PHP script will export all the mysql table data into a csv file. <? $dbconnection; $table="members"; $csv = NULL; /* link identifier from db connection */ $r = mysql_query("show columns from ".$table); while ($row = mysql_fetch_assoc($r)) { $csv .= $row['col_name'].','; } $csv = substr($csv, 0, -1)."n"; $r = mysql_query("select * from ".$table); while ($row […]

Read more »