up
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
$db = Database::getInstance();
|
||||
$phone = $argv[1] ?? '573022548060';
|
||||
$rows = $db->fetchAll("SELECT c.id, c.message_id, c.direction, c.message_type, c.content, c.created_at, u.phone_number FROM conversations c JOIN users u ON c.user_id=u.id WHERE u.phone_number = ? ORDER BY c.created_at DESC LIMIT 5", [$phone]);
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($rows, JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user