作者 karlet

feat:更新composer

... ... @@ -14,9 +14,11 @@ class MysqlCli
private int $period = 300;
private int $lastReconnectTime = 0;
private $connectConfig = null;
private $database = null;
public function __construct($host,$port,$database,$username,$password,$charset='utf8',$prefix='', $connectCount = 20)
{
$this->database = $database;
$this->prefix = $prefix;
$this->connectConfig = [
'host' => $host,
... ... @@ -114,7 +116,7 @@ class MysqlCli
$data = $this->execute('SELECT', $sql);
$newData = [];
if (empty($col)) {
$newsql = 'SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME="' . $this->parseTable($table) . '" ORDER BY `ORDINAL_POSITION` ASC';
$newsql = 'SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = "'.$this->database.'" AND TABLE_NAME="' . $this->parseTable($table) . '" ORDER BY `ORDINAL_POSITION` ASC';
$coldata = $this->execute('SELECT', $newsql);
if (!$coldata) {
return false;
... ...
... ... @@ -24,8 +24,8 @@ class SimpleServerCoroutine
];
$simpleRequest = new SimpleRequest($requestInfo);
$res = call_user_func($callback, $simpleRequest);
if(!$res){
$response->end();
if(empty($res)){
$response->end('');
}else{
$response->end($res);
}
... ...