Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/69.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框架中以区分大小写的方式从postgresql表中选择数据_Php_Sql_Laravel_Postgresql - Fatal编程技术网

Php 我需要在laravel框架中以区分大小写的方式从postgresql表中选择数据

Php 我需要在laravel框架中以区分大小写的方式从postgresql表中选择数据,php,sql,laravel,postgresql,Php,Sql,Laravel,Postgresql,由于我在这个web应用程序的前端使用的是完全的日历依赖性,我需要将cleaner_颜色指定为BackgroundColor,而不是BackgroundColor,但是postgres似乎不接受这种语法 我正在考虑使用collation COLLATE SQL\u Latin1\u General\u CP1\u CS\u AS使users表区分大小写,但是我相信这仍然不会传递它需要的大写字母C的背景色 public function get_turnovers() { retu

由于我在这个web应用程序的前端使用的是完全的日历依赖性,我需要将cleaner_颜色指定为BackgroundColor,而不是BackgroundColor,但是postgres似乎不接受这种语法

我正在考虑使用collation COLLATE SQL\u Latin1\u General\u CP1\u CS\u AS使users表区分大小写,但是我相信这仍然不会传递它需要的大写字母C的背景色

public function get_turnovers()
{
        return DB::table('cleanings')
        ->leftJoin('units', 'cleanings.unit_id', '=', 'units.id')
        ->leftJoin('users as u1', 'cleanings.cleaner_id', '=', 'u1.id')
        ->leftJoin('users as u2', 'cleanings.cleaner2_id', '=', 'u2.id')
        ->where('turnover', true)
        ->selectRaw("concat('T ', suite_name, '  ',  suite_number) as title, cleaning_date as date, cleanings.id,
        turnover, booking_id, cleaner_id, cleaner2_id, 
        units.location as location,
        u1.first_name as c1_first_name,
        u2.first_name as c2_first_name,
        u1.cleaner_colour as backgroundColor,
        u1.last_name as c1_last_name,
        u2.last_name as c2_last_name,
        cleanings.notes as notes")
        ->get();
}