mssql_execute - Executes a stored procedure on a MS SQL server database
Вернуться к: Mssql Функции
mssql_execute
(PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)
mssql_execute — Executes a stored procedure on a MS SQL server database
This function was REMOVED in PHP 7.0.0.
Alternatives to this function include:
- Using an EXEC query issued through PDO_SQLSRV, PDO_ODBC, SQLSRV, or the unified ODBC driver.
Описание
Executes a stored procedure on a MS SQL server database
Список параметров
-
stmt
-
Statement handle obtained with mssql_init().
-
skip_results
-
Whenever to skip the results or not.
Примеры
Пример #1 mssql_execute() example
<?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);
?>
Примечания
Замечание:
If the stored procedure returns parameters or a return value these will be available after the call to mssql_execute() unless the stored procedure returns more than one result set. In that case use mssql_next_result() to shift through the results. When the last result has been processed the output parameters and return values will be available.
Смотрите также
- mssql_bind() - Adds a parameter to a stored procedure or a remote stored procedure
- mssql_free_statement() - Free statement memory
- mssql_init() - Initializes a stored procedure or a remote stored procedure
Вернуться к: Mssql Функции