Fix DISTINCT ORDER BY error in KDS station-filtered query
MySQL rejects ORDER BY o.SubmittedOn when SELECT DISTINCT has DATE_FORMAT(o.SubmittedOn) AS SubmittedOn. Use the alias instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
49e3c812c9
commit
576c90fffd
1 changed files with 1 additions and 1 deletions
|
|
@ -81,7 +81,7 @@
|
|||
WHERE #whereSQL#
|
||||
AND i.StationID = ?
|
||||
AND oli.IsDeleted = b'0'
|
||||
ORDER BY o.SubmittedOn ASC, o.ID ASC
|
||||
ORDER BY SubmittedOn ASC, o.ID ASC
|
||||
", stationParams, { datasource = "payfrit" })>
|
||||
<cfelse>
|
||||
<cfset qOrders = queryTimed("
|
||||
|
|
|
|||
Reference in a new issue