CodeIgniter Forums
closeCursor() or not ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: closeCursor() or not ? (/showthread.php?tid=41323)



closeCursor() or not ? - El Forum - 05-04-2011

[eluser]souri84[/eluser]
Hello,

I have a new question but maybe isn't the best place to post it...

To optimize performances, in PDO, we can (must ?) to closeCursor() like:

Code:
$query->prepare(...);
...
$query->execute(array(...));
$query->fetchAll();
$query->closeCursor();

It's necessary to closeCursor in codeIgniter or it's automatic ?

thanks for your answers,

Thibaut