2009-08-31 117 views
0

我試圖得到的值都等於b.business_id = 22和l.zip = 91326.對我來說最簡單的事情是嘗試select l.*,b.name from buslocations AS l left join business as b where b.business_id = '22' and l.zip = '91326',但顯然這是有問題的。對於兩個定義值的正確語法的任何幫助將不勝感激。mysql語法錯誤

回答

2

你需要使用上,例如,以匹配一些關鍵或價值表:

select l.*,b.name from buslocations AS l left join business as b ON l.x=b.Y WHERE b.business_id = '22' and l.zip = '91326' 
+0

eek,我一定很累。謝謝。 – 2009-08-31 07:47:59

+0

...和dusoft贏得比賽。 :) – 2009-08-31 07:48:02