Issue
I am using a laravel 5.5 and calling a stored proc which is working fine on my localhost with local DB. But throwing an error when I am trying to use on live server.
Stored proc is accepting 2 params as shown below in code.
$bidPlacedStats_ = DB::select('call getBidStatDayWise(?,?)',[$userId_,0]);
Error
Allowed memory size of 134217728 bytes exhausted (tried to allocate 318783264 bytes)
Please help me. Thanks
Solution
I had solved this issue with following line of codes before calling the stored procedure.
$pdo = DB::connection()->getPdo();
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
Reference : Link
Answered By - U.Malik
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.