|
- <?php
- require_once "../Common/Config.php";
- $openid=$_COOKIE['wxopenid'];
- $customer_name=$_GET["name"];
- $customer_mobile=$_GET["mobile"];
- $customer_idno=$_GET["idno"];
- $sql="APP_MEMBER_LINKER_EDIT '{$openid}',0,'{$customer_name}','{$customer_mobile}',0,'{$customer_idno}'";
- $pdo = new PDO("sqlsrv:Server=".HOST.";Database=".DB, USER, PASSWORD);//5.6版本pdo连接sqlsrv
- $result=$pdo->query($sql);
- $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
- $linker_count=isset($rowset[0]["LINKER_COUNT"])?$rowset[0]["LINKER_COUNT"]:0;
- $data=array(
- "code"=>$rowset[0]["ERRCODE"],
- "info"=>$rowset[0]["ERRINFO"]
- );
- if ($linker_count >0){
- foreach ($rowset as $v){
- $val=array();
- $val["customer_id"]=$v["ID"];
- $val["customer_name"]=$v["CUSTOMER_NAME"];
- $val["customer_mobile"]=$v["CUSTOMER_MOBILE"];
- $val["customer_idtype"]=$v["CUSTOMER_ID_TYPE"];
- $val["customer_idno"]=$v["CUSTOMER_ID_NO"];
-
- $data["order_list"][]=$val;
- }
- }
- echo json_encode($data);
|