所以我更新Virtuemart後,當我尋找在客戶網站的某個特定的產品我收到此錯誤:VirtueMart搜索錯誤
vmError: exeSortSearchListQuery Unknown column 'p.product_sku' in 'where clause'
SQL=SELECT SQL_CALC_FOUND_ROWS p.`virtuemart_product_id`
FROM `tqmux_virtuemart_products` as p
INNER JOIN `tqmux_virtuemart_products_en_gb` as l
using (`virtuemart_product_id`)
LEFT JOIN `tqmux_virtuemart_product_manufacturers`
ON p.`virtuemart_product_id` = `tqmux_virtuemart_product_manufacturers`.`virtuemart_product_id`
WHERE ((`l`.product_name LIKE "%anya%"
OR `product_sku` LIKE "%anya%"
OR `l`.`slug` LIKE "%anya%"
OR `l`.product_s_desc LIKE "%anya%"
OR `l`.`metadesc` LIKE "%anya%"
OR `p.product_sku` LIKE "%anya%"
OR `c.category_name` LIKE "%anya%"
OR `c.category_description` LIKE "%anya%"
OR `m.mf_name` LIKE "%anya%"
OR `p.product_name` LIKE "%anya%"
OR `p.product_s_desc` LIKE "%anya%")
AND `tqmux_virtuemart_product_manufacturers`.`virtuemart_manufacturer_id` = 1
AND p.`virtuemart_vendor_id` = "1")
group by p.`virtuemart_product_id`
ORDER BY p.`created_on` DESC, `virtuemart_product_id` DESC
LIMIT 0, 20
誰能幫助我?謝謝。
UPDATE
你能告訴我們什麼表tqmux_virtuemart_products有它(DDL)嗎?該錯誤暗示列product_Sku在該表中不存在。此外,爲什麼你在哪裏有'product_Sku'和'p.product_Sku'?第一個產品_Sku來源於哪個表格?最後的表別名'p','l'好像存在哪裏是'c','m'來自哪裏? – xQbert
我不自己構建查詢,VM自己完成。我會將表格的圖像附加到上面的問題上。 – PatrickMelia
@xQbert如果你不介意我問,你會發現問題是什麼?我一直在努力嘗試,並沒有得到任何地方。 – PatrickMelia