0

I am trying to create a sql query in mysql which shows all Documents linked to a project task. I cannot find the table which shows the related columns to link both tables. The documents are inthe table Vtiger_notes and project tasks are in the table Vtiger_ProjectTask. Can anybody know how these are related in mysql?

thanks

4

1 回答 1

0

A lot of relations beetwen modules in vTiger are managed by a third table. In this case the third table to join is the ** vtiger_senotesrel** Supposed that your project task id is 12345 the query to execute is

SELECT vtiger_notes.* FROM vtiger_notes inner join vtiger_senotesrel on vtiger_senotesrel.notesid= vtiger_notes.notesid inner join vtiger_crmentity on vtiger_crmentity.crmid= vtiger_notes.notesid  inner join vtiger_crmentity crm_pTask on crm_pTask.crmid=vtiger_senotesrel.crmid where vtiger_crmentity.deleted=0 and crm_pTask.crmid=12345
于 2016-09-17T09:57:52.137 回答