当我在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中没有错误。
任何人都知道如何解决此错误?