首页 >函数列表 >mssql_execute

mssql_execute

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

说明

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

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.

参见


  • mssql_bind
  • mssql_close
  • mssql_connect
  • mssql_data_seek
  • mssql_execute
  • mssql_fetch_array
  • mssql_fetch_assoc
  • mssql_fetch_batch
  • mssql_fetch_field
  • mssql_fetch_object
  • mssql_fetch_row
  • mssql_field_length
  • mssql_field_name
  • mssql_field_seek
  • mssql_field_type
  • mssql_free_result
  • mssql_free_statement
  • mssql_get_last_message
  • mssql_guid_string
  • mssql_init
  • mssql_min_error_severity
  • mssql_min_message_severity
  • mssql_next_result
  • mssql_num_fields
  • mssql_num_rows
  • mssql_pconnect
  • mssql_query
  • mssql_result
  • mssql_rows_affected
  • mssql_select_db
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道