CodeIgniter and SQLSRV Driver. - 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: CodeIgniter and SQLSRV Driver. (/showthread.php?tid=54334) |
CodeIgniter and SQLSRV Driver. - El Forum - 09-04-2012 [eluser]adanyc[/eluser] Hi guys, I'm having many problems in code igniter and I would like u could help me. I have the following stored procedure created in SQL Server 2008. Code: CREATE PROCEDURE [dbo].[USP_CODEIGNITER_DEMO] This stored make an update in one table I have. My PHP code is this: Code: function update_usuarios() { In my view I only wanna print my output resul from my sql stored procedure, of 'exito' or 'error' from my action. I give u my model code too: Code: function index() { Sorry 4 my bad english, I'm from Peru. Thanxs 4 all. I hope ur help. CYA CodeIgniter and SQLSRV Driver. - El Forum - 09-04-2012 [eluser]NotDior[/eluser] I've done one thing with CodeIgniter and SQL Server 2008 with a stored procedure and here's how I did things ( from what you pasted in here it looks like you might have a few things incorrect ). My controller looks like: Code: public function search() { My model looks like: Code: public function searchDB($sText) { CodeIgniter and SQLSRV Driver. - El Forum - 09-05-2012 [eluser]adanyc[/eluser] Hi friend. Thank u for your time. Im gonna test your method. But I'd like u or someone else post another alternative solution for my problem but using my code. Please note i'm using OUTPUT parameters in SQL sever and I wanna get and show results of them in the view. See u. Thnxs a lot. CodeIgniter and SQLSRV Driver. - El Forum - 09-05-2012 [eluser]adanyc[/eluser] [quote author="NotDior" date="1346792530"]I've done one thing with CodeIgniter and SQL Server 2008 with a stored procedure and here's how I did things ( from what you pasted in here it looks like you might have a few things incorrect ). My controller looks like: Code: public function search() { My model looks like: Code: public function searchDB($sText) { I tested your solution and I get this error, what it means? Code: A Database Error Occurred CodeIgniter and SQLSRV Driver. - El Forum - 09-05-2012 [eluser]NotDior[/eluser] It's been awhile since I've taken any spanish but I believe it's saying there's an error with your cursors in the SQL statement. Again I've only done one project like this, so I'm not of much help other than what I was able to get to work. Regards, Christian |