dsegw3424 2013-08-22 21:15
浏览 15

在所有值作为键,值对传入后执行函数(Web服务)

I have two tables:

Table 1(t1):

column=> id, t1.col1, t1.col2, t1.col3
values=>  1, v1, v2, v3

Table 2(t2):

column=> t1_id, t2.col1, t2.col2
values=> 1, val1, val2
         1, val3, val4
         1, val5, val6

I am executing a function(WebService) which takes in key, value pairs(as parameters) in an array For example:

array(array("Key" => val1,
            "value" => val2),
      array("key" => val3,
            "value" => val4))

I want to do the same by getting the values from the database that is table 2. So, What I did is, fetched the key, value pairs from the data base and stored it as $key, and & $value. Now the function looks like:

 array(array("Key" => $key,
            "value" => $value))

when I run this, Instead of taking all the key, value pairs and executing after, The function is executing for each key, value pair.

I want to execute the function only all the key, value pairs are in the array.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
    • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
    • ¥15 运动想象脑电信号数据集.vhdr
    • ¥15 三因素重复测量数据R语句编写,不存在交互作用
    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒