我对一次调用多个表的查询仍然很陌生,这是我的旧查询字符串,
$sql = "SELECT id,category,title,seo_url,product_line,look_for_terms,image,rating FROM sphinx_index WHERE id IN ($entry_ids) ORDER BY rating DESC";
这是我试图开始工作的新人,
$sql = "SELECT a.id, a.category, a.title, a.seo_url, a.product_line, a.look_for_terms, a.image, a.rating a.status, c.username FROM sphinx_index a, entry b, users c WHERE a.id IN ($entry_ids) AND b.user_id = c.id ORDER BY a.rating DESC";