所以我有一個基本的問題,如何從外部聯接語句的表中獲取變量。從第一個表中獲取變量左加入
mysql_query("SELECT *
FROM (cal_events
left join cal_cities on cal_events.city_id = cal_cities.id)
left join cal_genre on cal_events.genre_id = cal_genre.id
WHERE start_day BETWEEN DATE_ADD(CURDATE(), INTERVAL -1 DAY)
AND DATE_ADD(CURDATE(), INTERVAL 5 DAY)
order by start_day");
while($info = mysql_fetch_array($data)) {
echo $info['id'];
}
這將回聲出流派的ID,但我需要從cal_events的ID ...使用$信息[ 'cal_events.id']剛剛拋出錯誤
HELP!
工作就像一個魅力!謝謝 – Aaron 2010-08-30 05:27:19