-1

I want to know contact's owner with a MySQL query.

I'm using Vtiger 7.1 with PHP 7 and MySQL 5.

Milo
  • 3,365
  • 9
  • 30
  • 44

1 Answers1

0

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)
pinaki
  • 5,393
  • 2
  • 24
  • 32