[Vtigercrm-developers] MySQL select statement
Adam Heinz
amh at metricwise.net
Tue Dec 18 07:25:08 PST 2012
I don't generally prefix the database name unless I'm doing multi-database
joins. Move your where logic up into the joins and delete it from the
where clause.
FROM `vtiger_crmentity`
INNER JOIN `vtiger_account` ON `vtiger_account`.`accountid` =
`vtiger_crmentity`.`crmid`
INNER JOIN `vtiger_accountscf` ON `vtiger_accountscf`.`accountid` =
`vtiger_account`.`accountid`
INNER JOIN `vtiger_invoice` ON `vtiger_invoice`.`accountid` =
`vtiger_account`.`accountid`
On Tue, Dec 18, 2012 at 10:17 AM, John Crisp <john at reetspetit.net> wrote:
> FROM `crm`.`vtiger_crmentity` INNER JOIN `crm`.`vtiger_account` INNER
> JOIN `crm`.`vtiger_accountscf` INNER JOIN `crm`.`vtiger_invoice`
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121218/1db41ec1/attachment-0001.html
More information about the vtigercrm-developers
mailing list