Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when filtering by column with spaces on name #81

Open
InsomniumBR opened this issue May 18, 2017 · 0 comments
Open

Bug when filtering by column with spaces on name #81

InsomniumBR opened this issue May 18, 2017 · 0 comments

Comments

@InsomniumBR
Copy link

InsomniumBR commented May 18, 2017

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) AS t ORDER BY Dias na atividade ASC LIMIT 20"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant