Update get_user_messages.php

This commit is contained in:
Lizandro Guarnizo
2026-01-24 08:28:49 -05:00
parent 2e14f21377
commit 04857c773d
+2 -2
View File
@@ -63,11 +63,11 @@ try {
$params = ['user_id' => $userId];
if ($before) {
$sql .= " AND created_at < :before";
$sql .= " AND c.created_at < :before";
$params['before'] = $before;
}
$sql .= " ORDER BY created_at DESC LIMIT " . $limit;
$sql .= " ORDER BY c.created_at DESC LIMIT " . $limit;
// Log params/consulta para diagnóstico si algo falla (no sensible)
error_log('get_user_messages.php - params: ' . json_encode(['user_id' => $userId, 'limit' => $limit, 'before' => $before]));