<?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <refentry xml:id='function.mssql-execute' xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>mssql_execute</refname> <refpurpose>Executes a stored procedure on a MS SQL server database</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>mssql_execute</methodname> <methodparam><type>resource</type><parameter>stmt</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>skip_results</parameter><initializer>false</initializer></methodparam> </methodsynopsis> <para> Executes a stored procedure on a MS SQL server database </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>stmt</parameter></term> <listitem> <para> Statement handle obtained with <function>mssql_init</function>. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>skip_results</parameter></term> <listitem> <para> Whenever to skip the results or not. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>mssql_execute</function> example</title> <programlisting role="php"> <![CDATA[ <?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); ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="notes"> &reftitle.notes; <note> <para> If the stored procedure returns parameters or a return value these will be available after the call to <function>mssql_execute</function> unless the stored procedure returns more than one result set. In that case use <function>mssql_next_result</function> to shift through the results. When the last result has been processed the output parameters and return values will be available. </para> </note> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>mssql_bind</function></member> <member><function>mssql_free_statement</function></member> <member><function>mssql_init</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->