Pgsql error: You might need to add explicit type casts

前端 未结 2 597
鱼传尺愫
鱼传尺愫 2021-02-12 18:04

My website is just working fine til i deployed it to heroku and the problem is heroku uses pgsql and I\'m using mysql and laravel framework.

my query is



        
2条回答
  •  忘掉有多难
    2021-02-12 18:30

    You could do this:

    $q->where('cast(vaccine_id AS VARCHAR)','LIKE','%' . $vaccine_id)
    

    OR

    $q->where('cast(vaccine_id AS TEXT)','LIKE','%' . $vaccine_id)
    

提交回复
热议问题