This commit is contained in:
joyqi 2020-05-12 16:21:59 +08:00
parent 371e6c9884
commit 3413dfd7ce
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.0','7.2', '7.3', '7.4']
php: ['7.2', '7.3', '7.4']
steps:
- name: Checkout code
uses: actions/checkout@v2

View File

@ -401,7 +401,13 @@ class Typecho_Db_Query
*/
public function order($orderby, $sort = Typecho_Db::SORT_ASC)
{
$this->_sqlPreBuild['order'] = ' ORDER BY ' . $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort);
if (empty($this->_sqlPreBuild['order'])) {
$this->_sqlPreBuild['order'] = ' ORDER BY ';
} else {
$this->_sqlPreBuild['order'] .= ', ';
}
$this->_sqlPreBuild['order'] .= $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort);
return $this;
}