vue项目调用本地tp5接口中find_in_set数据库查询会报错

浏览:595 发布日期:2020/06/03 分类:ThinkPHP5专区 关键字: Thinkphp5.0.24
vue项目调用本地tp5接口中find_in_set数据库查询会报错,取消exp内容即恢复正常
具体报错            $map['brand_id']=$brand_id;
            $or['']=['exp',Db::raw("FIND_IN_SET($brand_id,arr_brand_id)")];
        $data=db('programme')->where($map)->whereOr($or)->page(input('pageNum'),input('pageShow'))->select();
接口代码为上面内容

具体报错信息,跨域请求已处理 处理在入口文件中 代码$origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';

header("Access-Control-Allow-Origin:".$origin);
header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
header('Access-Control-Allow-Credentials: true');
header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding");
请各位大佬给个提示
最佳答案
评论( 相关
后面还有条评论,点击查看>>