[Vtigercrm-developers] Odd Mobile and Web Service problem with Contacts
Geoff Roberts
geoff at strategicict.com.au
Tue Nov 25 08:35:38 GMT 2014
Hi,
I've been testing the Mobile API and Web Service REST API.
I've come across an odd problem.
When doing a query to the Contacts module where multiple records match,
only one record is returned.
For example if I send the following queries:
"select * from Contacts where firstname='chris';"
"select * from Contacts where firstname like 'chris';"
Only one Contact record is returned - even though there are multiple
records that match.
If I run the query directly on the database the right number of records
are returned.
This doesn't seem to happen in Leads when multiple records match.
Debug output below shows the sql statement being run by vTiger against
the database. If I run the statement below directly against the
datatabase two records are returned.
The Pear->PearDatabse Array only has the one element.
Any suggestions on how to get all records returned. This is worrying me
a great deal as it is hard to have confidence with inconsistent results.
Is there a file I could put some extra debugging output so I can see why
the extra records are being dropped?
Kind regards,
Geoff
Tue Nov 25 03:00:30 2014,209 [31970] DEBUG VT - Prepared sql query being
executed : SELECT vtiger_contactdetails.salut
ation,vtiger_contactdetails.firstname,vtiger_contactdetails.contact_no,vtiger_contactdetails.phone,vtiger_contactdetai
ls.lastname,vtiger_contactdetails.mobile,vtiger_contactdetails.accountid,vtiger_contactsubdetails.homephone,vtiger_con
tactsubdetails.leadsource,vtiger_contactsubdetails.otherphone,vtiger_contactdetails.title,vtiger_contactdetails.fax,vt
iger_contactdetails.department,vtiger_contactsubdetails.birthday,vtiger_contactdetails.email,vtiger_contactdetails.rep
ortsto,vtiger_contactsubdetails.assistant,vtiger_contactdetails.secondaryemail,vtiger_contactsubdetails.assistantphone
,vtiger_contactdetails.donotcall,vtiger_contactdetails.emailoptout,vtiger_crmentity.smownerid,vtiger_contactdetails.re
ference,vtiger_contactdetails.notify_owner,vtiger_crmentity.createdtime,vtiger_crmentity.modifiedtime,vtiger_crmentity
.modifiedby,vtiger_customerdetails.portal,vtiger_customerdetails.support_start_date,vtiger_customerdetails.support_end
_date,vtiger_contactaddress.mailingstreet,vtiger_contactaddress.otherstreet,vtiger_contactaddress.mailingcity,vtiger_c
ontactaddress.othercity,vtiger_contactaddress.mailingstate,vtiger_contactaddress.otherstate,vtiger_contactaddress.mail
ingzip,vtiger_contactaddress.otherzip,vtiger_contactaddress.mailingcountry,vtiger_contactaddress.othercountry,vtiger_c
ontactaddress.mailingpobox,vtiger_contactaddress.otherpobox,vtiger_crmentity.description,vtiger_contactdetails.isconve
rtedfromlead,vtiger_contactdetails.contactid FROM vtiger_contactdetails
LEFT JOIN vtiger_contactsubdetails ON vtiger_c
ontactdetails.contactid=vtiger_contactsubdetails.contactsubscriptionid
LEFT JOIN vtiger_crmentity ON vtiger_contactdet
ails.contactid=vtiger_crmentity.crmid LEFT JOIN vtiger_customerdetails
ON vtiger_contactdetails.contactid=vtiger_custo
merdetails.customerid LEFT JOIN vtiger_contactaddress ON
vtiger_contactdetails.contactid=vtiger_contactaddress.contact
addressid WHERE (vtiger_contactdetails.firstname LIKE 'chris') AND
vtiger_crmentity.deleted=0 LIMIT 0,100;
Tue Nov 25 03:00:30 2014,209 [31970] INFO VT - PearDatabase ->TRANS
Commited
Tue Nov 25 03:00:30 2014,209 [31970] INFO VT - PearDatabase ->TRANS
Completed
Tue Nov 25 03:00:30 2014,210 [31970] INFO VT - PearDatabse ->Array
More information about the vtigercrm-developers
mailing list