Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento-iOS请求服务Magento PHP错误_Php_Android_Ios_Magento - Fatal编程技术网

Magento-iOS请求服务Magento PHP错误

Magento-iOS请求服务Magento PHP错误,php,android,ios,magento,Php,Android,Ios,Magento,我有一个PHP编写的与Magento系统交互的服务。 在PHP服务中,我生成一个函数来更新产品的价格。我通过GET方法请求这个url。问题是我在Android work ok中请求此url,但iOS我收到以下错误: string(391) "SQL ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that co

我有一个PHP编写的与Magento系统交互的服务。 在PHP服务中,我生成一个函数来更新产品的价格。我通过GET方法请求这个url。问题是我在Android work ok中请求此url,但iOS我收到以下错误:

string(391) "SQL ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND customer_id = 5303)' at line 1 SQL QUERY: SELECT `customerprices_prices`.* FROM `customerprices_prices` WHERE (product_id =  AND customer_id = 5303)
下面是PHP代码:

Mage::app()->setCurrentStore(STORE_ILATIANO);
$_product = Mage::getModel('catalog/product')->load($ipd);
$_product->setPrezzoconsgrossisti($wholesaler);
$_product->save(); <-- error when request in iOS(I am use AFNetworking library, Android work ok)

有人建议这个问题吗?我不明白这个问题发生在side iOS或Magento系统中。

不,不,我不做任何查询。我只是调用magento中的函数。如果是服务器端,为什么安卓可以正常工作?我想你没有通过产品ID示例:我有url。在Android with Loopj library浏览器中请求此url也是可行的,但在iOS中请求此url是错误的。我检查了很多次。它在调用保存函数之前具有产品标识。如何?调用$\u product->save函数时如何获取查询?我不是Magento开发人员。是的,我看到并理解产品id为空。但问题是为什么?当我调用:$_product=Mage::getModel'catalog/product'->加载$ipd;它返回一个包含所有内容的对象,包括产品id、价格、名称等,。。。然后致电$_product->setPrezzoconsgrossisti$批发商;为该对象中的属性PrezzoconsGrossisti设置新值并再次保存。它仅在iOS中请求时出错: