CodeIgniter Forums
Database Driver for MSQQL with execute for stored procedure 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: Database Driver for MSQQL with execute for stored procedure and sqlsrv driver! (/showthread.php?tid=43404)



Database Driver for MSQQL with execute for stored procedure and sqlsrv driver! - El Forum - 07-10-2011

[eluser]titandj[/eluser]
Hi everyone!

I'm working on a database driver for Mssql (Microsoft Sql server) with support for stored procedure using the functions of the mssql extension:

Code:
<?php
// Create a new statement
$stmt = mssql_init('NewBlogEntry');

// Some data strings
$title = 'Test of blogging system';
$content = 'If you can read this, then the new system is compatible with MSSQL';

// Bind values
mssql_bind($stmt, '@author',    'Felipe Pena',  SQLVARCHAR,     false,  false,   60);
mssql_bind($stmt, '@date',      '08/10/2008',   SQLVARCHAR,     false,  false,   20);
mssql_bind($stmt, '@title',     $title,         SQLVARCHAR,     false,  false,   60);
mssql_bind($stmt, '@content',   $content,       SQLTEXT);

// Execute the statement
mssql_execute($stmt);

// And we can free it like so:
mssql_free_statement($stmt);
?>

The other point is the out of support of mssql in php 5.3.x, the new library with support of Microsoft is sqlsrv.

http://sqlsrvphp.codeplex.com/

I accept suggestions!