Tuesday, 10 September 2013

Save MySQL-table to local computer

Save MySQL-table to local computer

At first, I want to excuse me for my English, but I have a problem
I create a table form a database in this way:
//the connection goes right, so I don't put it into my code
<table id="database">
<tr>
<th>Title1</th>
<th>Title2</th>
<th>Title3</th>
<th>Title4</th>
</tr>
<?php
$result = mysql_query("SELECT * FROM `table`");
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".$row['Column1']."</td>";
echo "<td>".$row['Column2']."</td>";
echo "<td>".$row['Column3']."</td>";
echo "<td>".$row['Column4']."</td>";
echo "</tr>";
}
?>
</table>
The problem is that I'm trying to put these data into file, with the
reason to save these columns local on my computer, because I want to
delete the table online.
I already tried TCPDF and html2pdf
It's not obligated to put these in a pdf, but I want these just saved.
I hope you can help me.

No comments:

Post a Comment