You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just found a small bug when using column name with spaces.
Since I am not an expert on PHP, I would suggest any of you a little help on fixing this.
The column name specified was "Dias na atividade".
Thanks in advance,
Error message:
"An error occured rendering the grid: SQLSTATE[42000]: Syntax error or access violation: 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 'na atividade ASC LIMIT 20' at line 15, query was: SELECT t.* FROM (SELECT DATE_FORMAT(sales_flat_order.created_at, '%d/%m/%Y') AS 'Data', sales_flat_order.increment_id AS 'Pedido', sales_flat_order.entity_id AS order_id, CONCAT(TRIM(sales_flat_order.customer_firstname), ' ', TRIM(sales_flat_order.customer_lastname)) AS 'Cliente', sales_order_status.label AS 'Status', datediff(now(), sales_flat_order.created_at) AS 'Dias na atividade' FROM sales_flat_order_status_history history INNER JOIN (select parent_id, max(entity_id) lastId from sales_flat_order_status_history group by parent_id) tLastDate ON (history.entity_id = tLastDate.lastId) INNER JOIN sales_flat_order ON sales_flat_order.entity_id = history.parent_id INNER JOIN sales_order_status ON history.status = sales_order_status.status WHERE history.status IN ('processing' , 'preimpressao', 'producao','refacao','expedicao') ORDER BY datediff(now(), sales_flat_order.created_at) DESC) AS t ORDER BY Dias na atividade ASC LIMIT 20"
The text was updated successfully, but these errors were encountered:
Hello,
I have just found a small bug when using column name with spaces.
Since I am not an expert on PHP, I would suggest any of you a little help on fixing this.
The column name specified was "Dias na atividade".
Thanks in advance,
Error message:
"An error occured rendering the grid: SQLSTATE[42000]: Syntax error or access violation: 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 'na atividade ASC LIMIT 20' at line 15, query was: SELECT
t
.* FROM (SELECT DATE_FORMAT(sales_flat_order.created_at, '%d/%m/%Y') AS 'Data', sales_flat_order.increment_id AS 'Pedido', sales_flat_order.entity_id AS order_id, CONCAT(TRIM(sales_flat_order.customer_firstname), ' ', TRIM(sales_flat_order.customer_lastname)) AS 'Cliente', sales_order_status.label AS 'Status', datediff(now(), sales_flat_order.created_at) AS 'Dias na atividade' FROM sales_flat_order_status_history history INNER JOIN (select parent_id, max(entity_id) lastId from sales_flat_order_status_history group by parent_id) tLastDate ON (history.entity_id = tLastDate.lastId) INNER JOIN sales_flat_order ON sales_flat_order.entity_id = history.parent_id INNER JOIN sales_order_status ON history.status = sales_order_status.status WHERE history.status IN ('processing' , 'preimpressao', 'producao','refacao','expedicao') ORDER BY datediff(now(), sales_flat_order.created_at) DESC) ASt
ORDER BY Dias na atividade ASC LIMIT 20"The text was updated successfully, but these errors were encountered: