mssql_execute

(PHP 4 >= 4.0.7, PHP 5, PECL odbtp >= 1.1.1)

mssql_executeExecutes a stored procedure on a MS SQL server database

Warning

This function was REMOVED in PHP 7.0.0.

Alternatives to this function include:

说明

mssql_execute ( resource $stmt [, bool $skip_results = FALSE ] ) : mixed

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.

范例

Example #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);
?>

注释

Note:

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.

参见

相关文章
php ibm db2 函数 executes an sql statement directlyphp ibm db2 函数 executes a prepared sql statementphp ibm db2 函数 requests the next result set from a stored procedurephp firebird/interbase 函数 request information about a database serverphp mssql 函数 adds a parameter to a stored procedure or a remote stored procedurephp mssql 函数 关闭ms sql server链接php mssql 函数 打开ms sql server链接php mssql 函数 executes a stored procedure on a ms sql server databasephp mssql 函数 initializes a stored procedure or a remote stored procedurephp mssql 函数 open persistent ms sql connectionphp mssql 函数 send ms sql queryphp mssql 函数 select ms sql databasephp mysqlnd ms 函数 switch to global sharding server for a given tablephp mysqlnd ms 函数 查询给定的 sql 会发送给 master、slave 还是最后使用的 mysql server 执行。php sqlite 函数 executes a query against a given database and returns a result handlephp sqlsrv 函数 opens a connection to a microsoft sql server databasephp ms sql server pdo connecting to microsoft sql server and sybase databasesphp ms sql server pdo connecting to ms sql server and sql azure databasesphp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graphphp sdo das relational 函数 executes a given sql query against a relational database and returns the results as a normalised data graph
关注编程学问公众号