# Column Type Collation Attributes Null Default Extra Action
1 id int(12) No None AUTO_INCREMENT Change Change Drop Drop More Show more actions
2 username varchar(40) latin1_swedish_ci No None Change Change Drop Drop More Show more actions
3 email varchar(100) latin1_swedish_ci No None Change Change Drop Drop More Show more actions
4 catid varchar(100) latin1_swedish_ci No None Change Change Drop Drop More Show more actions
5 data1 varchar(40) latin1_swedish_ci No None Change Change Drop Drop More Show more actions
6 data2 varchar(150) latin1_swedish_ci No None Change Change Drop Drop More Show more actions
7 maincontent text latin1_swedish_ci No None Change Change Drop Drop More Show more actions
8 helplevel enum('0', '1') latin1_swedish_ci No 0 Change Change Drop Drop More Show more actions
9 date datetime No None Change Change Drop Drop More Show more actions
10 updateddate datetime No None Change Change Drop Drop More Show more actions
11 status enum('0', '1', '2', '3') latin1_swedish_ci No 0 Change Change Drop Drop More Show more actions
the relationship for helpdesk is id and for helpdeskreplies its _ticketid
Helpdeskreplies:
Code:
# Column Type Collation Attributes Null Default Extra Action
1 id int(32) No None AUTO_INCREMENT Change Change Drop Drop More Show more actions
2 _ticketid int(32) No None Change Change Drop Drop More Show more actions
3 username varchar(20) utf8_general_ci No None Change Change Drop Drop More Show more actions
4 reply varchar(300) utf8_general_ci No None Change Change Drop Drop More Show more actions
$ticket should be used to display everything from helpdeskreplies, aswell as some information from helpdesk, such as category id, username, maincontent ect.
its a helpdesk system that will have many different replies to the specific help desk ticket.
If i have got the wrong impression of what you mean by object, please let me know so i can correct myself.
Run this query directly on the command line utilities or on PHPMyAdmin. It looks to me that your entries in helpdeskreplies are null entries. You should be using innodb relations to ensure the integrity of the table relationships.
Also make sure to separate the fields appropriately within the query. Do not select *.