1
我想使用Zend框架構建SQL查詢。這裏是我的SQL查詢語句:使用zend框架獲取來自多個表的數據
SELECT of.order_Id, of.subtotal, of.status, c.name
FROM order_form of, customer c
WHERE c.customer_Id = of.customer_Id
然而,當我試圖實現它在Zend框架,將顯示一條錯誤消息。這是我使用Zend Framework的查詢語句。
$query = $db->select()
->from(array('c' => 'customer'), 'name')
->where('c.customer_Id = ?', $customer_Id)
->join('order_form', 'order_form.customer_Id = customer.customer_Id', array('order_Id', 'subtotal', 'status'))
->order("order_form.order_Id ASC");
什麼是錯誤 – 2012-08-14 05:48:05
嗨維傑,問題解決了,對不便引起的不便引起的 – Dale 2012-08-18 04:56:01