Is the fastest method because it does doe checks. it's a wrapper for the database specific native php function that gets the last inserted id. The call_function method does some additional checks which makes it slower. The function is intended for database specific functions that can't or are hard to abstract for the cross database library CI provides.
Is the fastest method because it does doe checks. it's a wrapper for the database specific native php function that gets the last inserted id. The call_function method does some additional checks which makes it slower. The function is intended for database specific functions that can't or are hard to abstract for the cross database library CI provides.[/quote]
What is the best option to use?
The directly PHP function wrapper or the call_function ??
You best choose performance above security if you need to call a function. The wrapper already slows down your application a tiny bit. The more checks you add the sooner you start noticing the application slowness.
[eluser]xwero[/eluser]
The security for functions is checking if they exists and if they are callable. These things you find out while you are developing and test the site on the production server. So you as a developer do the checks yourself. Functions don't suddenly disappear from your server.