I'm running into an annoying problem. I've been trying to get a few strings to work in PHP and they have not been successful.
For example, this line in bash:
mysql -pPassword -e'drop table table_members;' databasename_db
works in a bash script.
However, this line in PHP:
system("mysql -pPassword -e'drop table table_members;' databasename_db");
After hard core studying, I found a way to work this out. Here's how:
mysql_connect(localhost, username, password);
mysql_query("DROP TABLE table_members");
But now I'm in a serious stump because this line:
system("mysql -pPassword databasename_db < /var/www/html/dumpfile.dmp");
does not work either!
I've been google'ing this for a LONG TIME! I can't find an answer!
I need someone to show me how to do the following:
mysql -pPassword databasename_db < /var/www/html/dumpfile.dmp