Also I am having issue even using the alias without the DB::raw.
Like this in this example:
->select('applicationAssessment.applicationID AS appID',...........)..........
->groupBy('appID')
I still get the Column appID (in this case) not found?
select
`applicationAssessment`.`applicationID` as `appID`,
CONCAT(student.lastName, ", ", student.firstName) as name,
ROUND (AVG(applicationAssessment.total), 2) + studentDemographics.GPA AS Score,
..............(other non relevant stuff here like joins and what not)
group by `appID`"
I copy/paste word for word the entire query (I'm not showing it all for readability purposes) and it works in SequalPro (OSX) but not in laravel 4
Convert your laravel query to plain text with toSql() and execute with laravel DB::select ,worked for me.
$result_query = $query->toSql(); $result = DB::select(DB::raw($result_query));
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community