Closed leoncool closed 8 years ago
@catfan affected me too
@leoncool
<?php
$database->select(TABLE_Finance_Trans, "", [
"AND"=>$filter,
"ORDER"=> [TABLE_Finance_Trans.".created_at" => DESC"], //Just use [$field => $direction] array
"LIMIT"=>[($pageNumber)$itemsPerPage,$itemsPerPage]]);
Also having this issue.
The ORDER
syntax is updated since v1.1.
With V1.1.2 and V1.1.3 there is a bug with ORDER, DESC and ASC will not add to the SQL query string.
For example: $trans=$database->select(TABLE_FinanceTrans,"",["AND"=>$filter,"ORDER"=>TABLE_Finance_Trans.".createdat DESC","LIMIT"=>[($pageNumber)$itemsPerPage,$itemsPerPage]]); This is create query: SELECT * FROM "finance_trans" ORDER BY "finance_trans"."created_at" LIMIT 0,10
DESC does not show up in SQL query, please fix. Thanks!