[eluser]davidk43[/eluser]
I'm wondering what is the best way to execute a stored procedure from Codeigniter. I have an application that is running on MSSQL2008 (for its XQuery support) and would like to know what is the best way to comply and use codeigniters active record database class without completely rolling my own solution.
Outside of CI I'd normally write something native like this:
Code:
$stmt=mssql_init("myprocedure", $conn);
/* now bind the parameters to it */
mssql_bind($stmt, "@id", $id, SQLINT4, FALSE);
mssql_bind($stmt, "@name", $name, SQLVARCHAR, FALSE);
mssql_bind($stmt, "@email", $email, SQLVARCHAR, FALSE);
/* now execute the procedure */
$result = mssql_execute($stmt);
Is it best I keep it separate and roll my own or is there a nifty accepted way to do this within CI's mssql driver?
thanks for any thoughts.
David