Reply to Re: Run mysql shell commands from PHP

Your name:

Reply:


Posted by Martie on 05/09/06 20:56

On 8 May 2006 05:58:47 -0700, apostolosl@gmail.com wrote...
>
>In case I have confused you, this my php code. Last step doesn't work,
>all I get is a mysql information page...
>
>PHP CODE--->
>
>//DUMP DATA IN FILE
>$command="mysqldump backcatalogue table_products > table_products.sql";
>system($command);
>
>//CONNECT TO REMOTE DATABASE
>$command="mysql --host=$ohost --user=$ouser --password=$opass
>--database=$odb;";
>system($command);
>
>//UPDATE REMOTE DATABASE FROM FILE
>$command ="mysql source stb_products.sql;";
>system("command ") ;
>
>END PHP CODE -->
>

If you are running the command from outside of MySQL, I think you can use this
syntax...

$command = "mysql --host=$ohost --user=$ouser --password=$opass --database=$odb
< updatefile.sql";
system($command);


--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация