我的陈述有什么问题?我已经尝试了我能想到的一切。
$stmt = $mysqli->prepare("SELECT host_name, review_title FROM lhr_reviews
UNION
SELECT host_url FROM lhr_hostinfo WHERE host_name = ?
ORDER BY host_name");
$stmt->bind_param("s", $id);
$stmt->execute();
$res = $stmt->get_result();
while($row = $res->fetch_assoc()) {
$list .= "<li><a href='".$row['host_url']."'>".substr($row['review_title'],0,20)."</a></li>";
}