小编Chr*_*ian的帖子

Pgsql错误:您可能需要添加显式类型转换

我的网站工作正常,直到我将它部署到heroku,问题是heroku使用pgsql,我正在使用mysql和laravel框架.

我的疑问是

$patient = Patient::where('patient_address', 'ILIKE' ,'%' . $request->input)->where('patient_sex', 'ILIKE' ,'%' . $request->gender)->whereHas('users', function($q) use($vaccine_id){
        $q->where('vaccine_id','ILIKE','%' . $vaccine_id);
    })->get();
Run Code Online (Sandbox Code Playgroud)

这是我将它部署到heroku时所得到的

SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: integer ~~* unknown LINE 1: ...ient_id" = "patients"."PatientID" and "vaccine_id" ILIKE $3)

HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. (SQL: select * from "patients" where "patient_address" ILIKE %San Francisco and "patient_sex" ILIKE % and exists (select * from "vaccines" inner …

postgresql heroku

15
推荐指数
2
解决办法
6万
查看次数

正则表达式如何验证字母之间的下划线

我如何允许任何单词字符,下划线之间应有字母和数字。

例如:ab2_sb,s_s,

但不允许sdc_或_s2

这是我的代码

[a-zA-Z0-9_]{6,255}$

我在javascript上使用正则表达式

regex

3
推荐指数
1
解决办法
279
查看次数

标签 统计

heroku ×1

postgresql ×1

regex ×1