Solution:
Step 1: Install putty.exe + plink.exe in php7 machine. Step 2: I created this methods to do all the job for you/me. Example1:
$query = "SELECT * FROM user";
$rs = select($query);
if($rs)
for($index = 0; $index < count($rs);$index++){
//ALWAYS use this. Now u can use that array like a normal resultset $rs["lalala"]
$row1 = $rs[$index];
//use this like usual
echo $rs["username"];
}
Example2:
$query = "SELECT * FROM user";
$rs = select($query);
if($rs)
for($index = 0; $index < count($rs);$index++){
//ALWAYS use this. Now u can use that array like a normal resultset $rs["lalala"]
//$row1 = $rs[$index];
//now you didn't the line above...
echo $rs[$index]["username"];//you'll need something like $rs[0]["username"]
}
For update/delete/insert you can use something similar to the insert method. Example 3:
if(m_insert("insert into user (name,pwd,email) values ('kkk', 'hahaha', 'email@lala.com');")){
echo "true";
} else {
echo "false";
}
Remember1: You need to change the method variables (host, database, username, password, etc)...
Remember2: Change the mysql credentials at this line $commands[0] = 'mysql -u username -pPASSWORD...'