如何在Laravel上调用存储过程? [英] How to call stored procedure on Laravel?
问题描述
当我在laravel5中运行更新存储过程时出现错误.
Error comes when i run update stored procedure in laravel5 like this..
Connection.php line 620: SQLSTATE[42000]:
中的QueryException语法错误或访问冲突:1064 SQL语法错误;检查与您的MySQL服务器版本相对应的手册以获取正确的语法,以在第1行(SQL: call sp_clientupdate(108, Sandeep,09999999999,,,sandeep@gmail.com,,,,,,,))
QueryException in
Connection.php line 620: SQLSTATE[42000]:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near'Sandeep,09999999999,,,sandeep@gmail.com,,,,,,,)'
at line 1(SQL: call sp_clientupdate(108, Sandeep,09999999999,,,sandeep@gmail.com,,,,,,,))
我的代码是....
return DB::select('call sp_clientupdate(108, Sandeep,0999999999,,,sandeep@gmail.com,,,,,,,)');
请任何人给我解决方案.....
Pls anyone give me solution.....
推荐答案
您进行更改.
return DB::select('call sp_clientupdate("108", "Sandeep","0999999999","","","sandeep@gmail.com","","","","","","",)');
尝试正常运行....
这篇关于如何在Laravel上调用存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!