RE: [PHP-DB] How to dump a DB vi the internett

From: Date: Fri, 03 Nov 2000 16:44:28 +0000
Subject: RE: [PHP-DB] How to dump a DB vi the internett
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4193@lists.php.net to get a copy of this message
This should work: <? header("Content-type: text/txt"); $link = mysql_connect("server", "user", "password"); mysql_select_db("database", $link); $sql = "select * from table_name"; $result = mysql_query($sql, $link); while($row = mysql_fetch_array($result, MYSQL_NUM)) { $string = ""; for($i = 0; $i < sizeof($row); $i++) { $string .= "$row[$i]:"; } $string = ereg_replace(":$", "\n", $string); echo $string; } ?> Jason Stechschulte jpstech@nc.edu -----Original Message----- From: David Tandberg-Johansen [mailto:david@datajo.no] Sent: Friday, November 03, 2000 8:09 AM To: php-db@lists.php.net Subject: [PHP-DB] How to dump a DB vi the internett Hello! I wonder if anyone could give me an hint on how to dump database information in a comma seperated file to a user. Example: Client/user comes to the page and she/he clikcs an link and it begins downloading an file with the DB information i an comma sepperated file Thanks David :-) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#4193) next »