0
這是我正在執行的代碼。嘗試執行SQL查詢時出現三重錯誤
SELECT * Catagory
FROM Catagory
LEFT JOIN products.Price
ON Catagory.Category=products.Price
WHERE ((Catagory.Category='Ring' OR Catagory.Category='Earings') AND(products.Price<=30))
ORDER BY products.Price
我不確定是否這是我試圖進行連接或可能需要重置權限的事實。
該代碼似乎在數據庫中使用其他表時工作,我敢肯定,這一個具有所有相同的設置。
SELECT * Catagory
FROM Catagory
LEFT JOIN products.Price
ON Catagory.Category=products.Price
WHERE ((Catagory.Category='Ring' OR Catagory.Category='Earings') AND(products.Price<=30))
ORDER BY products.Price LIMIT 0, 25
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Catagory
FROM Catagory
LEFT JOIN products.Price
ON Catagory.Category=products' at line 1
Warning in ./libraries/DbQbe.php#1669
array_map() expects parameter 1 to be a valid callback, class 'Util' not found
Backtrace
./libraries/DbQbe.php#1669: array_map(
string 'Util::backquote',
array,
)
./libraries/DbQbe.php#1556: PMA\libraries\DbQbe->_getJoinForFromClause(array,
array,
)
./libraries/DbQbe.php#1789: PMA\libraries\DbQbe->_getFromClause(array)
./libraries/DbQbe.php#1857: PMA\libraries\DbQbe->_getSQLQuery(array)
./db_qbe.php#153: PMA\libraries\DbQbe->getSelectionForm()
Warning in ./libraries/DbQbe.php#1670
implode(): Invalid arguments passed
Backtrace
./libraries/DbQbe.php#1670: implode(
string ', ',
NULL,
)
./libraries/DbQbe.php#1556: PMA\libraries\DbQbe->_getJoinForFromClause(
array,
array,
)
./libraries/DbQbe.php#1789: PMA\libraries\DbQbe->_getFromClause(array)
./libraries/DbQbe.php#1857: PMA\libraries\DbQbe->_getSQLQuery(array)
./db_qbe.php#153: PMA\libraries\DbQbe->getSelectionForm()
'SELECT * FROM產品類別Catagory'應該說是'SELECT * FROM Category'? – JanR
兩個表都在同一個數據庫中嗎? –
而且......你確定你想在'Category'(一個字符串)上等於'Price'(一個數字)的兩個表嗎? – mauro