• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Result set Issue in CI

#1
[eluser]Unknown[/eluser]
This is a bit different from what other users have faced in similar topics.

I have a stored procedure that I want to execute. I am trying to execute another query (that returns a count) after the procedure in CI, but CI returns the following error for not getting mysqli_result object.

Fatal error: Call to a member function num_rows() on a non-object

If the procedure execution is the last db statement in my code, everything works fine. But when I try to execute even a simple query after that, CI returns the error.

CI seems to freeze the resultset once a procedure is executed. I dont understand what prompted the CI developers to do that. I tried a simple workaround by calling the db connect() again and then, the new query starts working. But I guess that's not the right way to do it.

Did anyone else face this issue? If so, can you please guide me how to resolve this in an optimum way

#2
[eluser]danmontgomery[/eluser]
in ./application/config/database.php, check:

Code:
$db['default']['pconnect'] = TRUE;

#3
[eluser]adamp1[/eluser]
Do you have some example code of what does work and what dosn't?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.