Is there any php/mysql software that can pull data from a mysql database or a csv file, and allow you to edit, perhaps copy/paste new rows, then save this file as a csv?
needs to be web based. any pointers will help.
Is there any php/mysql software that can pull data from a mysql database or a csv file, and allow you to edit, perhaps copy/paste new rows, then save this file as a csv?
needs to be web based. any pointers will help.
Are the fgetcsv (http://us3.php.net/manual/en/function.fgetcsv.php) and fputcsv (http://us3.php.net/manual/en/function.fputcsv.php) functions sufficient?
In terms of fetching data from a mysql database:
$result = mysql_query($some_query);
$file = fopen('some_file', 'w');
$is_first = true;
while($row = mysql_fetch_assoc($result)) {
if($is_first) {
fputcsv($file, array_keys($row));
$is_first = false;
}
fputcsv($file, $row);
}
fclose($file);
Haven't tested it, but that will probably work to convert a mysql query result into a csv file, including the column names at the top of the file.