im trying to install the blog software blur6ex, and i am getting an error.
I located the problem, and it has to do with this query right here:
SELECT blog.title,blog.replyID, blog.user, blog.date, users.realname FROM blog, users INNER JOIN permissionGroups ON blog.permission = permissionGroups.pGroup WHERE (permissionGroups.username='anonymous' AND blog.replyID<>0) GROUP BY blog.title ORDER BY blog.id DESC LIMIT 0,5;
The error received is:
ERROR 1054 (42S22): Unknown column 'blog.permission' in 'on clause'
What I don't get is that the blog table has a permission column.
Here is the blog table:
mysql> describe blog;
+-----------------+-----------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+-----------------+------+-----+---------+----------------+
| ID | int(11) | NO | PRI | NULL | auto_increment |
| title | varchar(100) | YES | | NULL | |
| body | text | YES | MUL | NULL | |
| user | varchar(50) | YES | | NULL | |
| date | int(11) | YES | | NULL | |
| replyID | int(11) | YES | | NULL | |
| permission | varchar(50) | YES | | NULL | |
| userID | int(11) | YES | | NULL | |
| category | varchar(30) | YES | | NULL | |
+----------------+-----------------+------+-----+---------+----------------+
As you can see, there is a permission column.
Anyone have any ideas? When I was trying to isolate the problem and looking at the queries the system was performing, I found this query works fine:
SELECT blog.title,blog.ID FROM blog INNER JOIN permissionGroups ON blog.permission=permissionGroups.pGroup WHERE (permissionGroups.username='anonymous' AND blog.replyID=0) ORDER BY blog.date DESC LIMIT 0,10;
It has a blog.permission reference in the ON clause, and it works fine. Why doesnt the other?
Any help would be great. Thanks a lot.