Hi..
This is my first post here. Will try and explain as neat as I can :-P
I have an element in an xml file which goes like this -->
<?xml version="1.0"?>
<request table='rated_cdr' orderby='user,destination'>
<aggregates>
<aggregate fieldname='destination' type='standard' />
<aggregate fieldname='user' type='standard' />
<filter fieldname='user' operator='IN'>08002075538598,08702075538598</filter>
</aggregates>
<filters>
<filter operand='WHERE' fieldname='user' operator='IN' value='08002075538598,08702075538598'>
<filter operand='AND' fieldname='billed' operator='='>N</filter>
</filter>
<filter operand='OR' fieldname='billed' operator='!='>false</filter>
</filters>
<fields>
<field>type</field>
</fields>
</request>
<!-- End Result SELECT type,user,destination FROM rated_cdr WHERE (user IN('08002075538598', '08702075538598') AND BILLED = 'N')
OR BILLED != 'N' GROUP BY destination, user, type HAVING user IN (08002075538598, 0800207553859) ORDER BY user,destination
-->
Any ideas how I can get this done?? I have used a Dom parser and built up the query without the filters element. I am struggling how to get that bit alone done..
Any help would be much appreciated..
Thanks
Chr