mercredi 6 janvier 2016

Laravel Raw SQL Statements with nested where

I am using two tables i.e. uploads and locations. I am trying to write a raw sql statement in laravel, but not sure whether its correct or not. I want to display all the columns of locations table where city="something" and project_id ="something".Project_id belongs to locations table.

$get_all_data = \DB::select('select * from locations where city = ?', [$city],'select * from uploads where project_id=?',[$getProjectId]);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire