Not a bad Idea.  I guess I will have to hit the php mailing list to find 
out about this because I tried the following in PHP and it still did the 
same thing.
<?
require("../globals.inc");
$test=passthru("mysqldump -q -u$userName -p$password -h$hostName 
$databaseName");
$test=ereg_replace ("\n", "<br>", $test);
echo "$test";
?>

I can't seem to get the "passthru" into a variable.  It always displays the 
results instead.

Thank You
Steve

At 09:10 AM 4/12/2002, Jason Yates wrote:
>On Fri, 2002-04-12 at 10:56, Steve Buehler wrote:
> > I am using PHP to run the following command:
> > passthru("mysqldump -q -u$userName -p$password -h$hostName $databaseName");
> >
> > The problem is that it puts EVERYTHING on one line and, of course, and
> > wraps it.  I want to be able to dump the dump(schema) of a database onto a
> > web page so that they can view and/or cut and paste the dump results.
> >
> > An other question.  How can I make the command automatically try to 
> send it
> > as a file to the clients computer as an database.sql file so that they can
> > save it?  Like phpmyadmin does.
> >
>
>Run the data through a regular expression like,
>
>$line =~ s/\n/<br>/g;
>
>Sorry for the perl description.
>
>-Jason
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to