0
的问题是,该别名fechas
不采取任何价值...我不能用它为什么我不能使用别名?使用原始LARAVEL
> $tabla_c2 = DB::table('horarios')
> ->select('id_voluntario',DB::raw("DATE_FORMAT(fecha,'%y-%m-%d')as fechas"))
> ->where('id_voluntario','=', $temp)
> ->where('fechas','=', $datee)
> ->get();
这不是一个laravel问题,而是一个SQL限制。重复:https://stackoverflow.com/questions/14413867/mysql-select-as-in-where – Jeffrey
检查[这也是](https://stackoverflow.com/questions/200200/can-you-use- (''fechas','=',$ datee)'use' - > having(''fechas','='where-clause-in-mysql) – ljubadr
而不是' ,$ datee)' – ljubadr