Reputation: 679
I have a very simple question; I have a query running perfectly on sql server and I want to run this query using laravel framework, here is the query:
DECLARE @countries AS countryList;
INSERT INTO @countries SELECT countries.id FROM countries where countries.id in (1,2,3,4,9,11,14);
EXEC sp_positionofCourtCasesofLoanDefaultA @countries
in Laravel this is returning 'true' always
$result = DB::statement('DECLARE @countries AS countryList; INSERT INTO @countries SELECT countries.id FROM countries where countries.id in (' . $countries . ');
EXEC sp_positionofCourtCasesofLoanDefaultA @countries');
dd($result);
please help.
Upvotes: 1
Views: 616
Reputation: 11
i think DB:statement() returns either true or false. It is generally used in queries like insert in which no result is returned. So if the query was executed successfully it returns true otherwise returns false.
Upvotes: 1