[rt-users] Query Customfiels in MySQL

Alberto Villanueva alberto.villanueva at altran.es
Thu Apr 30 06:33:10 EDT 2009

Hi all.

I want to do a query with ObjectCustomFieldValues and Tickets.
The different queries run separately, but I don't know how I must
link them.

The queries are next:

1) select id,CustomField,Content from ObjectCustomFieldValues
where CustomField=2;

2) Select q.Name, count(t.id), Status from Tickets t, Queues q
WHERE t.Queue=q.id AND (t.Queue=3 OR t.Queue=6) AND
(Status='Resolved' OR Status!='Resolved') GROUP BY q.Name,Status
ORDER BY q.Name, Status;

I have tried to use the "Principals" table, but always the result
of next query (Select PrincipalType from Principals group by
PrincipalType)  is "Group" or "User".

Any idea?
Thanks a lot!!

Best regards,

Altran Technologies
ParqueEmpresarial Las Mercedes, Edificio 1 
C/ Campezo, 1. 28022 Madrid
Tel: + 34 91 744 46 00 - Ext: 2205
Fax: + 34 91 415 24 57

More information about the rt-users mailing list