Unknown column in order clause
Since you posted a partial query this wasn't obvious from the start, but your full query makes it clear;
SELECT *
FROM default_ps_products
WHERE manufacturer_id=2
ORDER BY `default_ps_products`.`manufacturer_id` ASC
LIMIT 0, 30
When you add an alias to default_ps_products
table in the select, you can't selectively use the alias only in the WHERE
clause, you'll also need to change the ORDER BY
to use the same alias. The full query should in other words be;
SELECT *
FROM default_ps_products p
WHERE p.manufacturer_id=2
ORDER BY p.`manufacturer_id` ASC
LIMIT 0, 30
To solve this use SELECT p.* FROM
instead of SELECT * FROM
.
The reason is that phpMyAdmin is adding an ORDER BY to your query for the first column in the results grid. Because of the alias, the code that does this fails.
This issue reproduces on phpMyAdmin 4.0.6. I don't know the status on the latest 4.2.5