I want to know contact's owner with a MySQL query.
I'm using Vtiger 7.1 with PHP 7 and MySQL 5.
I want to know contact's owner with a MySQL query.
I'm using Vtiger 7.1 with PHP 7 and MySQL 5.
The owner information is stored in the smownerid column of the vtiger_crmentity table. The contactid column for vtiger_contactdetails table is a foreign key for the crmid column in the vtiger_crmentity table.
For example, given a contact with record id = 1000, you will use the query as -
select * from vtiger_users where id=(select smownerid from vtiger_crmentity where crmid=1000)