Your solution almost worked for me.
I have one problem... I am only getting one row of data, and each field is on a new line. I need to get each row on a new line and output the entire table. How do I correctly structure?
Thanks for your help!
mysql_connect("localhost","username","password") or die("Unable to connect to SQL server");
mysql_select_db('database') or die("Unable to SELECT DB");
echo "Connected to DB";
echo "<br /><br />";
$q="SELECT * FROM product";
$result = mysql_query($q) or die( "Error: " . mysql_error() );
while( $row = mysql_fetch_assoc($result) )
$f = fopen("googlebase.txt","w");