Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > Project Tools > osTicket Bug Tracker > Bug

Issue Type Bug   Project osTicket Bug Tracker
DB Error #1143
Category Unknown
Affected Version 1.6 rc5
Priority 1 - Highest
Status Not a Bug
Fixed Version (none)
Submitted 10-12-2009
Assigned Users (none) Tags (none)

issueid=155 10-12-2009 05:36 AM
Junior Member
DB Error #1143

Just Installed last version and can't login to the admin area.
Every time i try i get this message sent to my email adress.

Code:
[SELECT * FROM ost_staff LEFT JOIN ost_groups USING(group_id) WHERE username='(myusername)' ]

SELECT command denied to user '(my_user)'@'localhost' for column 'group_id' in table 'ost_staff'
I see there's lots of people having this issue with new version too!
Reply

03-23-2011 09:37 AM
Junior Member
 
Hii

I have find the Bug. its mysql error.

Goto ==>
osticket/upload/include/class.staff.php

Change the code from

$sql=sprintf("SELECT * FROM ".STAFF_TABLE." LEFT JOIN ".GROUP_TABLE." USING(group_id) WHERE %s=%s ", is_numeric($var)?'staff_id':'username',db_input($v ar));

To

$sql=sprintf("SELECT * FROM ".STAFF_TABLE." s LEFT JOIN ".GROUP_TABLE." g on s.group_id=g.group_id WHERE %s=%s ", is_numeric($var)?'staff_id':'username',db_input($v ar));

Hope it will help you.

Thanks
Reply

Issue Tools
Subscribe to this issue

All times are GMT -4. The time now is 05:35 AM.