我有以下代码:
$variable = @mysql_result(mysql_query("SELECT *
FROM
(
SELECT `question_text`, `posted` FROM `questions`
WHERE `interest` = '$interests_following'
UNION ALL
SELECT `article_title`, `posted` FROM `articles`
WHERE `interest_id` = '$interestid'
UNION ALL
SELECT `interest_pic_title`, `posted` FROM `interest_pictures`
WHERE `interest_id` = '$interestid'
) t
ORDER BY posted DESC LIMIT 1
这组question_text
,article_title
并按(时间戳)对interest_pic_title
它们进行排序并显示最新的posted
我现在希望在结果旁边显示一个小图像(例如结果为 html 时的问号question_text
)以显示它是什么类型,我该如何过滤它来做到这一点?
谢谢