【问题标题】:Unable to update the database at vTiger server无法更新 vTiger 服务器上的数据库
【发布时间】:2014-04-22 14:20:07
【问题描述】:

我正在为 vTiger CRM 开发一个 android 应用程序,当我从我的 android 应用程序创建一个新的联系人记录时,它已正确添加到 vtiger 数据库(crmentity、contactdetails、contactaddress、contactsubdetails 和 contactscf)表中,我能够在我的 android 应用程序中找到相同的记录。但它不会显示在 Vtiger Web 应用程序上(当我刷新页面时,这个新记录不会显示在 Vtiger Web 应用程序的列表视图中)。 我无法找出问题所在,我认为我的网络服务有问题。

非常感谢您的帮助。

$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());

【问题讨论】:

    标签: php mysql crm vtiger


    【解决方案1】:

    我的建议是你不应该直接操纵vtiger_crmentity(无论是从网络应用程序还是从外部网络连接),因为 crmentity ID 应该由 vTiger 在内部管理。

    此外,vtiger_crmentity 对作为移动开发人员的您来说应该是完全不相关的:您必须使用 WebService API (official doc here) 或通过使用 JSON 格式的移动 API。 由于没有找到移动网络服务指南,我自己写了:see here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-12
      相关资源
      最近更新 更多