[turba] SQL data from two tables

Jan Schneider jan at horde.org
Wed Jun 14 15:18:12 PDT 2006


Zitat von Manilal K M <libregeek at gmail.com>:

> 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?

Yes, the (undocumented) 'filter' setting.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the turba mailing list