Re: sql dumps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Sent: Sunday, March 14, 2004 2:12 PM
Subject: RE:  sql dumps


> What does "sql file" mean? (no such thing exists)
>
> -----Original Message-----
> From: Bobo Wieland
> To: php-windows@xxxxxxxxxxxxx
> Sent: 14-3-2004 13:58
> Subject:  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
>
>

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux