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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -