[turba] SQL data from two tables

Manilal K M libregeek at gmail.com
Wed Jun 14 01:38:27 PDT 2006


Hello all,
   I have installed and configured turba as my core address book. Now
I need to integrate turba with vtiger(CRM) contacts/leads.
   I have two tables and everything worked fine as described below.
http://marc.theaimsgroup.com/?l=turba&m=113147578002847&w=2
   But I need to include a condition for selecting the rows from the
two tables. Basically my query is something like this:

SELECT leadid, leaddetails.firstname, leaddetails.lastname,
leaddetails.email, leadaddress.mobile, leadaddress.phone FROM
leaddetails LEFT JOIN leadaddress ON
leaddetails.leadid=leadaddress.leadaddressid WHERE
leaddetails.converted=0;

But since there is a WHERE clause which is automatically appended to
the query I can't use like this:
'table' => 'leaddetails LEFT JOIN leadaddress ON
leaddetails.leadid=leadaddress.leadaddressid WHERE
leaddetails.converted=0 ',

Is there any option to include a custom WHERE clause in sources.php?

regards
Manilal


More information about the turba mailing list