Retrieving Max value(select query) from MySQL using PHPSECLIB -
i able connect remote server , mysql tables using phpseclib. unable fetch max value of column , try insert table. output getting max(test_id) 1
. not sure might going wrong?
$value = $ssh->exec("mysql -h localhost -u root -pxxxx dbname -e \"select max(test_id) cpu_util_all;\""); echo "$value"; - output : max(test_id) 1 echo $ssh->exec("mysql -h localhost -u root -pxxxx dbname -e \"insert test_execution (test_id) values ('$value');\"");
Comments
Post a Comment