Hi, I am trying to import some tables from a dump file into a MySQL database
from a php web page. What is the best way to do this without using backticks
(fpassthru, system, exec or something else) and test for success or failure?
I tried the following and while it works, my test for success or failure
always produces a "Success" even when I change something to make it fail. I
thought system() outputs the last line of the command on success and FALSE
on failure. Any examples appreciated.


$status = system("mysql -umyuserid -pmypassword mydbname <

if($status == 'FALSE'){
echo 'Failed';
} else {
echo 'Success';


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

Reply via email to