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.
 
 
 
 
 

28 lines
952 B

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