RE: [PHP-WIN] sql dumps

From: Date: Sun, 14 Mar 2004 20:51:22 +0000
Subject: RE: [PHP-WIN] sql dumps
Groups: php.windows 
Request: Send a blank email to php-windows+get-23142@lists.php.net to get a copy of this message
That will fail if the query is broken into several lines. In any case I would suprise me if MySQL did not have the ability to do batch queries - e.i. with an interactive shell tell the shell to execute a certain file. -----Original Message----- From: Bobo Wieland To: Svensson, B.A.T. (HKG); php-windows@lists.php.net Sent: 14-3-2004 14:33 Subject: Re: [PHP-WIN] sql dumps A file with the .sql extension.... When I use MySQL-Front and export tables and data they are saved in sql-files. Just a simple txtfile with all INESET queries... I think I know how to do this now, but have just one problem; thought of using this bit of code from the users comments from the mysql_query entry in the online documentation: $dbf_handle = fopen($db_file, "r"); $sql_query = fread($dbf_handle, filesize($db_file)); fclose($dbf_handle); foreach ( explode(";", "$sql_query") as $sql_line) { if ( $dbquery = mysql_query("$sql_line") ) { ... But what is the data contaions several ";" ? Any other suggestions than a simple string_replace? .bobo ----- Original Message ----- From: "Svensson, B.A.T. (HKG)" <B.A.T.Svensson@lumc.nl> To: <php-windows@lists.php.net> Sent: Sunday, March 14, 2004 2:12 PM Subject: RE: [PHP-WIN] sql dumps > What does "sql file" mean? (no such thing exists) > > -----Original Message----- > From: Bobo Wieland > To: php-windows@lists.php.net > Sent: 14-3-2004 13:58 > Subject: [PHP-WIN] sql dumps > > Hi! > > Is there some good tutorial or example code for dumping sql-files > back-and-forth via php? > > .bobo > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#23142) next »