running mysql batch through php?

admin

Administrator
Staff member
Hi,

kind of a newbie and not terribly sure about all this, and was just wondering if anyone knows a way to run mysql in batch mode from a php script?

so instead of

shell> mysql -h host -u user -p blahblah < batch-file.sql

i could somehow get php to do it?
i'm not sure how i would get around it requesting the password, and also since the batch file is run straight from the shell account, its rather confusing....

thanks in advance to anyone kind enough to help.
 
Back
Top