我的网站工作正常,直到我将它部署到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 …
我如何允许任何单词字符,下划线之间应有字母和数字。
例如:ab2_sb,s_s,
但不允许sdc_或_s2
这是我的代码
[a-zA-Z0-9_]{6,255}$
我在javascript上使用正则表达式