简体   繁体   English

无法在vTiger服务器上更新数据库

[英]Unable to update the database at vTiger server

I'am developping an android application for vTiger CRM, and when i create a new contact record from my android app it's correctly added to the vtiger database (crmentity, contactdetails, contactaddress, contactsubdetails and contactscf) tables and i'am able to find the same record in my android app. 我正在为vTiger CRM开发一个android应用程序,当我从我的android应用程序创建新的联系人记录时,它已正确添加到vtiger数据库(信誉,contactdetails,contactaddress,contactsubdetails和contactscf)表中,并且我能够找到我的android应用中的相同记录。 but it don't display on Vtiger web application (this new record don't display in the listview of Vtiger web application when i refresh the page). 但它不会显示在Vtiger Web应用程序上(当我刷新页面时,此新记录不会显示在Vtiger Web应用程序的列表视图中)。 i couldn't figure out the problem, i think there's something wrong with my web service. 我无法弄清楚问题,我认为我的网络服务出了点问题。

help much appreciated. 帮助非常感谢。

$result = mysql_query("INSERT INTO vtiger_crmentity (crmid,smcreatorid,smownerid,modifiedby,setype,createdtime,modifiedtime,version,deleted) 
values('37','1','1','1','1','2014-04-21 12:32:01','2014-04-21 12:32:01','1','1')") or die(mysql_error());

$result2 = mysql_query("INSERT INTO vtiger_contactdetails(contactid,contact_no,salutation, firstname, lastname, mobile, 
fax,title,department, reportsto, secondaryemail)
VALUES('37','1','$salutation', '$first_name', '$last_name', 
'$mobile_phone', '$fax', '$title', '$department', 
  '$reports_to',  '$secondary_email')") or die(mysql_error());

$result3 = mysql_query("INSERT INTO vtiger_contactsubdetails(contactsubscriptionid,homephone,otherphone, assistant)
VALUES('37','$homephone','$otherphone', '$assistant')") or die(mysql_error());

$result4 = mysql_query("INSERT INTO vtiger_contactaddress(contactaddressid,mailingcity,mailingstreet)
VALUES('37','$mailingcity', '$mailingstreet')") or die(mysql_error());


$result5 = mysql_query("INSERT INTO vtiger_contactscf(contactid) VALUES('37')") or die(mysql_error());


 $result6 = mysql_query("INSERT INTO vtiger_customerdetails(customerid,) VALUES('37')") or die(mysql_error());

My advice is that you should not manipulate vtiger_crmentity directly (either from web app or from external web connection), as the crmentity ID should be managed by vTiger internally. 我的建议是,您不应直接(从Web应用程序或从外部Web连接)操作vtiger_crmentity ,因为crityity ID应该由vTiger内部管理。

Also, vtiger_crmentity should be completely irrelevant for you as a mobile developer: you either have to work with the WebService API ( official doc here ) or through the Mobile API, using JSON format. 另外,作为移动开发人员, vtiger_crmentity应该与您完全无关:您必须使用WebService API( 此处为官方文档 ),或者通过移动API使用JSON格式。 Since I found no guide for Mobile webservices, I wrote my own: see here 由于找不到移动Web服务指南,因此我写了自己的指南: 请参见此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM