jhutto
213
1
Laravel

mysql nested query... How to make it work in laravel query

Posted 2 months ago by jhutto

I've been trying to get this to work for quite awhile now and just need some help. I'm trying to write this query into a controller but can not figure out the format.

SELECT `CourseID`,`StudentID`, `ClassFee`,`HomeOfficeFee`,`MaterialsFee`, (`ClassFee`+`HomeOfficeFee`+`MaterialsFee`) AS TotalTuition, SUM(`PaymentAmount`)
FROM `somascourseregistrations`, `somasstudentclasspayments`
WHERE somascourseregistrations.id = somasstudentclasspayments.RegistrationID AND somascourseregistrations.id = $RegistrationID

Please help

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.