我的请求要求4个表
我需要显示上一页中所选l.Name
的所有l.City
。
因此,我添加了一个城市标准(在表格位置),以显示所有l.Name
城市(l.City)在网址中恢复此数据。
这是我的查询
$resultC = doQuery("SELECT DISTINCT e.PkID, e.LocID, e.LocationName, l.Name, e.LocationCity, l.City, e.Title
FROM events e
LEFT JOIN eventcategories ec ON (ec.EventID = e.PkID)
LEFT JOIN categories c ON (ec.CategoryID = c.PkID)
LEFT JOIN locations l ON (e.LocID = l.PkID)
WHERE l.IsActive = 1 " . $reqWhere . "
GROUP BY l.City, l.Name
ORDER BY l.City, l.Name
");
带
$city = cIn(strip_tags(urldecode($_GET['l'])));
$reqWhere = ' AND ec.CategoryID = '.$_GET['t'].' AND l.City = '.$city;
在网址
中恢复了两个变量删除AND l.City = '.$city
它会显示所有l.Name
l.City
我添加AND l.City = '.$city
没有结果