Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php LARAVEL 5.4 SQLSTATE[HY000]:一般错误:godaddy服务器上的1271_Php_Mysql_Laravel 5_Collation - Fatal编程技术网

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

Php LARAVEL 5.4 SQLSTATE[HY000]:一般错误:godaddy服务器上的1271,php,mysql,laravel-5,collation,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 '))

我在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);
这里是错误

这个错误只出现在我的godaddy共享主机上,在我的本地主机上没有错误


有人知道如何解决此错误吗?

请检查所有联接表的排序规则。应该是一样的。您的主机上运行的是哪个版本的MySQL?@apokryfos表的排序规则是utf8mb4\u unicode\u ci,数据库是utf1\u general_ci@benJmysql版本是5。6@BluYcw这是所有联接表的排序规则吗?