cyberstrider Posted March 18, 2009 Share Posted March 18, 2009 I'm trying to tidy up our open and closed tickets.. we have a number of these that are existing customers (set up as clients within WHMCS) but they have emailed in from an email address not registered in their client profile with us. So I am now adding these 'extra' email addresses into the client profile, however it still does not mark these as belonging to that particular client. I know I can go into the options section of each ticket and 'appoint' the client name however it is a slow and arduous process. How does one do this as a 'single' job for multiple tickets belonging to a particular email address? Regards Denesh 0 Quote Link to comment Share on other sites More sharing options...
cyberstrider Posted March 18, 2009 Author Share Posted March 18, 2009 We found a way forward with this... and it works wonders. ----- There are two sets of queries which will find out the appropriate information: select t.id, t.tid, t.did, t.userid, t.name, t.email, c.id, c.firstname, c.lastname, c.email from tbltickets t left join tblclients c on (t.email = c.email) where t.userid=0 and c.email is not null; select t.id, t.tid, t.did, t.userid, t.name, t.email, c.id, c.firstname, c.lastname, c.email, cons.email from tbltickets t left join tblcontacts cons on (t.email = cons.email) left join tblclients c on (cons.userid = c.id) where t.userid=0 and c.email is not null; These can be used to create the update statements to 'fix' the issue, and can be run as cron jobs. ----- Have informed WHMCS about this and have asked if it can be included in the next release of WHMCS. Regards Denesh 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.