2

I am working with Laravel and I am using a database in Sql Server. I need to execute a function that was do in Sql Server but I do not how to execute it.

The function in Sql Server is something that it:

Select dbo.functionName (848,95,37)

I try to execute it with this:

DB::connection('database')->select('Select dbo.functionName ?,?,?',array(848,95,37))

but Laravel return it: Cannot access empty property

I hope you can help me.

2 Answers 2

3

I had this problem too, i solved that like this:

DB::connection('database')->select('Select dbo.functionName (?,?,?) as result',array(848,95,37))
Sign up to request clarification or add additional context in comments.

Comments

2

May be this will work (Added parenthesis)

DB::connection('database')->select('Select dbo.functionName (?,?,?)',array(848,95,37))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.