SELECT WEEK(STR_TO_DATE(products_options_values, '%m-%d-%Y'),1) as order_week,
YEAR(STR_TO_DATE(products_options_values, '%m-%d-%Y'),1) as order_year
FROM orders_products_attributes
如果這僅僅是一週,我沒有得到任何錯誤,但只要我儘量選擇一年爲好,它會拋出有什麼毛病我MySQL查詢
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 '1) as order_year FROM orders_products_attributes'...
什麼時我做錯了?
謝謝...我只注意到它...我傻 – Bluemagica