Últimos 10 mensajes multimedia en la BD"; echo ""; $conversations = $db->fetchAll(" SELECT c.id, c.user_id, u.phone_number, c.direction, c.message_type, c.content, c.media_url, c.created_at FROM conversations c LEFT JOIN users u ON c.user_id = u.id WHERE c.message_type IN ('image', 'audio', 'video', 'document') ORDER BY c.created_at DESC LIMIT 10 "); echo ""; echo ""; foreach ($conversations as $msg) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
ID Teléfono Dir Tipo Content Media URL Fecha
{$msg['id']}{$msg['phone_number']}{$msg['direction']}{$msg['message_type']}
" . htmlspecialchars(substr($msg['content'], 0, 200)) . "
" . htmlspecialchars(substr($msg['media_url'], 0, 100)) . "
" . date('H:i:s', strtotime($msg['created_at'])) . "
"; echo "

Análisis:

"; echo ""; ?>