Thanks PRedmond your post prompted my revision of previous posts and with the modification for adding fields. As i have mention i had added the Company field on most pages except for the Admin ticket page. I have now managed to add a column with the header 'Company' and populate with company names, the inspiration coming from webpragmatist. See below for the modification steps.
/include/staff/ticket.inc.php
1.On Line 199 is the code:
$qselect = 'SELECT DISTINCT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,name,email,dept_name '.
',ticket.status,ticket.source,isoverdue,isanswered,ticket.created,pri.* ,count(attach.attach_id) as attachments ';
replace with
$qselect = 'SELECT DISTINCT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,name,email,dept_name '.
,ticket.status,ticket.source,isoverdue,isanswered,location,ticket.created,pri.* ,count(attach.attach_id) as attachments ';
nb. In the above code 'location' refers to my osticket table element where my company names reside.
2.After line 383 which is the code:
From
add
Company
nb. this adds the 'Company' column to the admin ticket page.
3. After line 421 which has the code:
<?=Format:($row,22,strpos($row,'@'))?>
add
<?=$row?>
The next modification i am trying to achieve is to make this Company column sortable.
Finbar.