i am using a library for PDO which has basic and easy syntax so everyone with basic MySQL knowledge will understand the code. I've tried running the queries with PDO (without the library i am using) but the issue persists.
$tickets = classes::$pdo->select('tickets', '*', [
'TicketUserID' => classes::$user->data['UserID']
]);
foreach($tickets as $ticket) {
$ticket_replies = classes::$pdo->select('replies', '*', [
'ReplyTicketID' => $ticket['TicketID']
], [
'ORDER' => [
'ReplyID' => 'DESC'
],
'GROUP' => 'ReplyTicketID'
]);
foreach($ticket_replies as $reply) {
echo $reply['ReplyID'];
}
}
After running the query i am getting a correct list with all selections but in Ascending order instead of descending. I am sure that this is not an issue in the library but in my code.
Regards.
Have you tried; ?
Because i think that your array was incorrect.