You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once "../Common/Config.php";
  3. $openid=$_COOKIE['wxopenid'];
  4. $id=$_GET["id"];
  5. $name=$_GET["name"];
  6. $mobile=$_GET["mobile"];
  7. $idno=$_GET["idno"];
  8. $sql="APP_MEMBER_LINKER_EDIT '{$openid}',{$id},'{$name}','{$mobile}',0,'{$idno}'";
  9. $pdo = new PDO("sqlsrv:Server=".HOST.";Database=".DB, USER, PASSWORD);//5.6版本pdo连接sqlsrv
  10. $result=$pdo->query($sql);
  11. $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
  12. $linker_count=isset($rowset[0]["LINKER_COUNT"])?$rowset[0]["LINKER_COUNT"]:0;
  13. $data=array(
  14. "code"=>$rowset[0]["ERRCODE"],
  15. "info"=>$rowset[0]["ERRINFO"]
  16. );
  17. if ($linker_count >0){
  18. foreach ($rowset as $v){
  19. $val=array();
  20. $val["customer_id"]=$v["ID"];
  21. $val["customer_name"]=$v["CUSTOMER_NAME"];
  22. $val["customer_mobile"]=$v["CUSTOMER_MOBILE"];
  23. $val["customer_idtype"]=$v["CUSTOMER_ID_TYPE"];
  24. $val["customer_idno"]=$v["CUSTOMER_ID_NO"];
  25. $data["order_list"][]=$val;
  26. }
  27. }
  28. echo json_encode($data);