LARAVEL 5.4 SQLSTATE [HY000]:一般错误:在godaddy服务器上1271

时间:2017-04-11 15:26:27

标签: php mysql laravel-5 collation

当我在laravel中搜索中文字符时遇到错误,它给了我一般错误:1271,

这是我的代码:

$sales_record = SalesRecord::select(DB::raw('sales_records.id as id, sales_records.amount as amount, clients.name as name, sales_records.created_at as created_at, sales_records.updated_at as updated_at '))
                                  ->join('clients', 'sales_records.client_id', '=', 'clients.id')
                                  ->Where('sales_records.amount', 'LIKE', '%' . $search . '%')
                                  ->orWhere('clients.name', 'LIKE', '%' . $search . '%')
                                  ->orWhere('sales_records.created_at', 'LIKE', '%' . $search . '%')
                                  ->orWhere('sales_records.updated_at', 'LIKE', '%' . $search . '%')
                                  ->orderBy('sales_records.created_at', 'DESC')
                                  ->paginate(10);

这是错误this

此错误仅出现在我的godaddy共享托管中,我的localhost中没有错误。

任何人都知道如何解决此错误?

0 个答案:

没有答案