跳至内容
菜单
此问题已终结

I'm using php and xmlrpc. When I use qty_available, no matter what type of filter using, respond is always all ids.

       $args_search=array(
         new xmlrpcval(array(
                 new xmlrpcval("qty_available","string"), 
                 new xmlrpcval("=","string"),
                 new xmlrpcval("4","string")
          ),
         "array")
       );    
       $sock=new xmlrpc_client($url_obj);
       $msg=new xmlrpcmsg('execute');
       $msg->addParam(new xmlrpcval($db, "string"));
       $msg->addParam(new xmlrpcval($uid, "int"));
       $msg->addParam(new xmlrpcval($pwd, "string"));
       $msg->addParam(new xmlrpcval("product.product", "string"));
       $msg->addParam(new xmlrpcval("search", "string"));
       $msg->addParam(new xmlrpcval($args_search, "array"));
       $resp = $sock->send($msg);
       $val=$resp->value();
       $ids=$val->scalarval();
       $num = count($ids);
         for ($i=0; $i<$num; $i++)
         {
            $id=$ids[$i]->scalarval();
            echo "--> id: ".$id;
         }

I's working fine when use e.g. "price_extra=150" . Do I have to pass some other attribute like location?

形象
丢弃
相关帖文 回复 查看 活动
0
3月 18
4339
2
3月 15
10533
1
3月 15
7748
1
1月 23
5185
1
4月 21
7539