25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
884 B

  1. <?php
  2. require_once "../Common/Config.php";
  3. $openid=$_COOKIE['wxopenid'];
  4. $cusid=$_GET["cusid"];
  5. $sql="APP_MEMBER_LINKER_DEL '{$openid}',".$cusid;
  6. echo $sql;
  7. $pdo = new PDO("sqlsrv:Server=".HOST.";Database=".DB, USER, PASSWORD);//5.6版本pdo连接sqlsrv
  8. $result=$pdo->query($sql);
  9. $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
  10. var_dump($pdo->errorInfo());
  11. var_dump($rowset);
  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);