2015-12-21 49 views
2

在本地主機一切正常,但上傳到交友後拋出錯誤,如在Laravel 4.2使用DB ::選擇()上的cPanel投擲的錯誤

SQLSTATE [42S02]運行SELECT查詢:基表或視圖沒有找到 enter image description here NB:

  $general_product_report = DB::select('SELECT X.Product_ID,X.Product_Name,X.Product_Description,X.Count_StockIN,IFNULL(Y.Count_StockOut,0) Count_StockOut,(X.Count_StockIN-IFNULL(Y.Count_StockOut,0)) Balance FROM (SELECT M.product_ID,M.Product_Name,M.Product_Description, SUM(Product_Count) AS Count_StockIN from (SELECT A.*,B.Product_Name,B.Product_Description FROM `stock_in` A, `products` B where A.Product_ID=B.Product_ID)M group by Product_ID,Product_Name,M.Product_Description) X LEFT JOIN (SELECT product_ID, SUM(Product_Count) AS Count_StockOUT from `stock_Out`group by Product_ID) Y On X.Product_ID=Y.Product_ID'); 
:我已經寫了使用 DB::select();

查詢查詢下面給出

回答

2

您需要驗證表stock_Out存在。