Hello,
In my fields.ini of the lob table i have the following start line:
__sql__ = "select a.*, b.lev_naam, b.lev_relatiecode from lob a left join leveranciers b on a.lob_lev_id=b.lev_id"
When i open the lob table in the interface on the localhost erverything works fine. Also when i click the view in phpmyadmin everything works fine.
But when I uploaded the code and the tables to the hosted server i get an error message:
Uncaught exception was thrown while processing this request. Troubleshooting steps:
- Refresh the APC Cache. - This may help in cases where you have changed a table column definition and your server has the APC opcode cache installed.
- Clear Cache Views - This may also help in cases where you have changed a table column definition and some tables include __sql__ definitions.
- Check your PHP error log for a description of the error and go from there. See this page for troubleshooting tips.
Fatal error: Uncaught exception 'Exception' with message 'SELECT command
denied to user 'usernameofthedatabase'@'%' for column 'lob_lev_id' in table
'lob'SELECT COUNT(*) as num FROM
`dataface__view_859c0efea6466122116c4da0dff97f5b` as `lob`' in /var/www ....................
In the phpmyadmin i get the following error when i click on this view:
#1356 - View 'databasenaam__view_9a80ef8a19d6aae41d76c747d1f0127a' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
I searched for a solution and came across this:
What's the problem here? And is there a workaround ?
I'm using the __sql__ statement to get the right field information like lev_naam (is the name) and lev_relatiecode (is the relationcode) instead of the id value.
Hope someone can help me with this.
Kind regards.
Johan