I don't understand why this query errors out...
Posted: Wed Mar 31, 2010 10:53 pm
Here is the query that produces an error
in SQLYog
The error returned is:
Query : SELECT inventory.*, categories.name as furname FROM furniture.inventory INNER JOIN furniture.categories ON (inventory.perm_cat...
Error Code : 1142
SELECT command denied to user: 'xxxxxxxxxx' for table 'inventory'
But I can execute this query with no problem (it is happily using the select command on the inventory table)
I can only conclude that there is something wrong with the first query that gives me that error and not anything to do with permissions
Any help with this would be appreciated, thank you in advance
Code: Select all
SELECT inventory.*, categories.name AS furname
FROM furniture.inventory INNER JOIN furniture.categories ON (inventory.perm_category_id = categories.id)
WHERE inventory.sales_status !='sold' AND inventory.date_last_modified <= DATE_SUB(CURDATE(),INTERVAL 5 DAY) AND inventory.category_id =20 AND inventory.perm_category_id !=20The error returned is:
Query : SELECT inventory.*, categories.name as furname FROM furniture.inventory INNER JOIN furniture.categories ON (inventory.perm_cat...
Error Code : 1142
SELECT command denied to user: 'xxxxxxxxxx' for table 'inventory'
But I can execute this query with no problem (it is happily using the select command on the inventory table)
Code: Select all
SELECT *
FROM inventory
WHERE sales_status ='sold'
AND date_last_modified <= DATE_SUB(CURDATE(),INTERVAL 7 DAY)
AND date_sold <= DATE_SUB(CURDATE(),INTERVAL 7 DAY)Any help with this would be appreciated, thank you in advance