I don't know if it was a good idea?

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@20626 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-02-27 21:22:48 +00:00
parent 113e1053cc
commit 5eb1b329bf

View file

@ -5,63 +5,83 @@
<refentry id="function.mssql-close">
<refnamediv>
<refname>mssql_close</refname>
<refpurpose>close MS SQL Server connection</refpurpose>
<refpurpose>Close MS SQL Server connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_close</function></funcdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
<paramdef>int
<parameter><optional>link_identifier</optional></parameter>
</paramdef>
</funcsynopsis>
<para>Returns: true on success, false on error
<para>
Returns: true on success, false on error.
</para>
<para> mssql_close() closes the link to a MS SQL Server database that's
associated with the specified link identifier. If the link
identifier isn't specified, the last opened link is assumed.
<para>
<function>Mssql_close</function> closes the link to a MS SQL
Server database that's associated with the specified link
identifier. If the link identifier isn't specified, the last
opened link is assumed.
</para>
<para> Note that this isn't usually necessary, as non-persistent
open links are automatically closed at the end of the script's
execution.
<para>
Note that this isn't usually necessary, as non-persistent open
links are automatically closed at the end of the script's
execution.
</para>
<para> mssql_close() will not close persistent links generated by
mssql_pconnect().
<para>
<function>Mssql_close</function> will not close persistent links
generated by <function>mssql_pconnect</function>.
</para>
<para>
See also: <function>mssql_connect</function>,
<function>mssql_pconnect</function>.
</para>
<para> See also: <function>mssql_connect</function>,
<function>mssql_pconnect</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.mssql-connect">
<refnamediv>
<refname>mssql_connect</refname>
<refpurpose>open MS SQL server connection</refpurpose>
<refpurpose>Open MS SQL server connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_connect</function></funcdef>
<paramdef>string <parameter>servername</parameter></paramdef>
<paramdef>string <parameter>username</parameter></paramdef>
<paramdef>string <parameter>password</parameter></paramdef>
<paramdef>string
<parameter><optional>servername</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>username</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>password</optional></parameter>
</paramdef>
</funcsynopsis>
<para> Returns: A positive MS SQL link identifier on success, or
false on error.
<para>
Returns: A positive MS SQL link identifier on success, or false
on error.
</para>
<para> mssql_connect() establishes a connection to a MS SQL server.
The servername argument has to be a valid servername that is defined
in the 'interfaces' file.
<para>
<function>Mssql_connect</function> establishes a connection to a
MS SQL server. The servername argument has to be a valid
servername that is defined in the 'interfaces' file.
</para>
<para> In case a second call is made to mssql_connect() with the
same arguments, no new link will be established, but instead, the
link identifier of the already opened link will be returned.
<para>
In case a second call is made to
<function>mssql_connect</function> with the same arguments, no
new link will be established, but instead, the link identifier of
the already opened link will be returned.
</para>
<para> The link to the server will be closed as soon as the
execution of the script ends, unless it's closed earlier by
explicitly calling <function>mssql_close</function>.
<para>
The link to the server will be closed as soon as the execution of
the script ends, unless it's closed earlier by explicitly calling
<function>mssql_close</function>.
</para>
<para>See also <function>mssql_pconnect</function>,
<function>mssql_close</function>.
<para>
See also <function>mssql_pconnect</function>,
<function>mssql_close</function>.
</para>
</refsect1>
</refentry>
@ -69,7 +89,7 @@
<refentry id="function.mssql-data-seek">
<refnamediv>
<refname>mssql_data_seek</refname>
<refpurpose>move internal row pointer</refpurpose>
<refpurpose>Move internal row pointer</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -78,14 +98,17 @@
<paramdef>int <parameter>result_identifier</parameter></paramdef>
<paramdef>int <parameter>row_number</parameter></paramdef>
</funcsynopsis>
<para> Returns: true on success, false on failure
<para>
Returns: true on success, false on failure.
</para>
<para> mssql_data_seek() moves the internal row pointer of the
MS SQL result associated with the specified result identifier to
pointer to the specifyed row number. The next call to
<function>mssql_fetch_row</function> would return that row.
<para>
<function>Mssql_data_seek</function> moves the internal row
pointer of the MS SQL result associated with the specified result
identifier to pointer to the specifyed row number. The next call
to <function>mssql_fetch_row</function> would return that row.
</para>
<para> See also: <function>mssql_data_seek</function>.
<para>
See also: <function>mssql_data_seek</function>.
</para>
</refsect1>
</refentry>
@ -93,7 +116,7 @@
<refentry id="function.mssql-fetch-array">
<refnamediv>
<refname>mssql_fetch_array</refname>
<refpurpose>fetch row as array</refpurpose>
<refpurpose>Fetch row as array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -101,22 +124,25 @@
<funcdef>int <function>mssql_fetch_array</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
</funcsynopsis>
<para> Returns: An array that corresponds to the fetched row, or
false if there are no more rows.
<para>
Returns: An array that corresponds to the fetched row, or false
if there are no more rows.
</para>
<para>
mssql_fetch_array() is an extended version of
<function>Mssql_fetch_array</function> is an extended version of
<function>mssql_fetch_row</function>. In addition to storing the
data in the numeric indices of the result array, it also stores
the data in associative indices, using the field names as keys.
</para>
<para>
An important thing to note is that using mssql_fetch_array() is
NOT significantly slower than using mssql_fetch_row(), while it
provides a significant added value.</para>
An important thing to note is that using
<function>mssql_fetch_array</function> is NOT significantly
slower than using <function>mssql_fetch_row</function>, while it
provides a significant added value.
</para>
<para>
For further details, also see
<function>mssql_fetch_row</function>
<function>mssql_fetch_row</function>.
</para>
</refsect1>
</refentry>
@ -124,46 +150,54 @@
<refentry id="function.mssql-fetch-field">
<refnamediv>
<refname>mssql_fetch_field</refname>
<refpurpose>get field information</refpurpose>
<refpurpose>Get field information</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>object <function>mssql_fetch_field</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
<paramdef>int <parameter>field_offset</parameter></paramdef>
<paramdef>int
<parameter><optional>field_offset</optional></parameter>
</paramdef>
</funcsynopsis>
<para>
Returns an object containing field information.
</para>
<para>
mssql_fetch_field() can be used in order to obtain information about
fields in a certain query result. If the field offset isn't
specified, the next field that wasn't yet retreived by
mssql_fetch_field() is retreived.
<function>Mssql_fetch_field</function> can be used in order to
obtain information about fields in a certain query result. If
the field offset isn't specified, the next field that wasn't yet
retreived by <function>mssql_fetch_field</function> is retreived.
</para>
<para>
The properties of the object are:
</para>
<itemizedlist>
<listitem><simpara>
name - column name. if the column is a result of a function, this property is set to computed#N,
where #N is a serial number.
</simpara></listitem>
<listitem><simpara>
column_source - the table from which the column was taken
</simpara></listitem>
<listitem><simpara>
max_length - maximum length of the column
</simpara></listitem>
<listitem><simpara>
numeric - 1 if the column is numeric
</simpara></listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<simpara>
name - column name. if the column is a result of a function,
this property is set to computed#N, where #N is a serial
number.
</simpara>
</listitem>
<listitem>
<simpara>
column_source - the table from which the column was taken
</simpara>
</listitem>
<listitem>
<simpara>
max_length - maximum length of the column
</simpara>
</listitem>
<listitem>
<simpara>
numeric - 1 if the column is numeric
</simpara></listitem>
</itemizedlist>
<para>
See also <function>mssql_field_seek</function>
See also <function>mssql_field_seek</function>.
</para>
</refsect1>
</refentry>
@ -171,7 +205,7 @@
<refentry id="function.mssql-fetch-object">
<refnamediv>
<refname>mssql_fetch_object</refname>
<refpurpose>fetch row as object</refpurpose>
<refpurpose>Fetch row as object</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -179,22 +213,26 @@
<funcdef>int <function>mssql_fetch_object</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
</funcsynopsis>
<para> Returns: An object with properties that correspond to the
fetched row, or false if there are no more rows.
<para>
Returns: An object with properties that correspond to the fetched
row, or false if there are no more rows.
</para>
<para>
<function>Mssql_fetch_object</function> is similar to
<function>mssql_fetch_array</function>, with one difference - an
object is returned, instead of an array. Indirectly, that means
that you can only access the data by the field names, and not by
their offsets (numbers are illegal property names).
</para>
<para> mssql_fetch_object() is similar to
<function>mssql_fetch_array</function>, with one difference - an
object is returned, instead of an array. Indirectly, that means
that you can only access the data by the field names, and not by
their offsets (numbers are illegal property names).</para>
<para>
Speed-wise, the function is identical to
<function>mssql_fetch_array</function>, and almost as quick as
<function>mssql_fetch_row</function> (the difference is
insignificant).
Speed-wise, the function is identical to
<function>mssql_fetch_array</function>, and almost as quick as
<function>mssql_fetch_row</function> (the difference is
insignificant).
</para>
<para> See also: <function>mssql_fetch-array</function> and
<function>mssql_fetch-row</function>.
<para>
See also: <function>mssql_fetch-array</function> and
<function>mssql_fetch-row</function>.
</para>
</refsect1>
</refentry>
@ -202,7 +240,7 @@
<refentry id="function.mssql-fetch-row">
<refnamediv>
<refname>mssql_fetch_row</refname>
<refpurpose>get row as enumerated array</refpurpose>
<refpurpose>Get row as enumerated array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -210,33 +248,69 @@
<funcdef>array <function>mssql_fetch_row</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
</funcsynopsis>
<para> Returns: An array that corresponds to the fetched row, or
false if there are no more rows.
<para>
Returns: An array that corresponds to the fetched row, or false
if there are no more rows.
</para>
<para>
mssql_fetch_row() fetches one row of data from the result
associated with the specified result identifier. The row is
returned as an array. Each result column is stored in an array
offset, starting at offset 0.
<function>Mssql_fetch_row</function> fetches one row of data from
the result associated with the specified result identifier. The
row is returned as an array. Each result column is stored in an
array offset, starting at offset 0.
</para>
<para>
Subsequent call to mssql_fetch_rows() would return the next row
in the result set, or false if there are no more rows.
Subsequent call to <function>mssql_fetch_rows</function> would
return the next row in the result set, or false if there are no
more rows.
</para>
<para>
See also: <function>mssql_fetch_array</function>,
<function>mssql_fetch_object</function>,
<function>mssql_data_seek</function>,
<function>mssql_fetch_lengths</function>, and
<function>mssql_result</function>.
<function>mssql_fetch_object</function>,
<function>mssql_data_seek</function>,
<function>mssql_fetch_lengths</function>, and
<function>mssql_result</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.mssql-field-length">
<refnamediv>
<refname>mssql_field_length</refname>
<refpurpose>Get the length of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_field_length</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
<paramdef>int
<parameter><optional>offset</optional></parameter>
</paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-field-name">
<refnamediv>
<refname>mssql_field_name</refname>
<refpurpose>Get the name of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_field_name</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
<paramdef>int
<parameter><optional>offset</optional></parameter>
</paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-field-seek">
<refnamediv>
<refname>mssql_field_seek</refname>
<refpurpose>set field offset</refpurpose>
<refpurpose>Set field offset</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -255,10 +329,27 @@
</refsect1>
</refentry>
<refentry id="function.mssql-field-type">
<refnamediv>
<refname>mssql_field_type</refname>
<refpurpose>Get the type of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>string <function>mssql_field_type</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
<paramdef>int
<parameter><optional>offset</optional></parameter>
</paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-free-result">
<refnamediv>
<refname>mssql_free_result</refname>
<refpurpose>free result memory</refpurpose>
<refpurpose>Free result memory</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -277,10 +368,61 @@
</refsect1>
</refentry>
<refentry id="function.mssql-get-last-message">
<refnamediv>
<refname>mssql_get_last_message</refname>
<refpurpose>
Returns the last message from server (over
min_message_severity?)
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>string
<function>mssql_get_last_message</function>
</funcdef>
<paramdef>void <parameter></parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-min-error-severity">
<refnamediv>
<refname>mssql_min_error_severity</refname>
<refpurpose>Sets the lower error severity</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>void
<function>mssql_min_error_severity</function>
</funcdef>
<paramdef>int <parameter>severity</parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-min-message-severity">
<refnamediv>
<refname>mssql_min_message_severity</refname>
<refpurpose>Sets the lower message severity</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>void
<function>mssql_min_message_severity</function>
</funcdef>
<paramdef>int <parameter>severity</parameter></paramdef>
</funcsynopsis>
</refsect1>
</refentry>
<refentry id="function.mssql-num-fields">
<refnamediv>
<refname>mssql_num_fields</refname>
<refpurpose>get number of fields in result</refpurpose>
<refpurpose>Get number of fields in result</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -288,14 +430,14 @@
<funcdef>int <function>mssql_num_fields</function></funcdef>
<paramdef>int <parameter>result</parameter></paramdef>
</funcsynopsis>
<para> mssql_num_fields() returns the number of fields in a result
set.
<para>
<function>Mssql_num_fields</function> returns the number of
fields in a result set.
</para>
<para>
See also:
<function>mssql_db_query</function>,
<function>mssql_query</function>,
<function>mssql_fetch_field</function>,
See also: <function>mssql_db_query</function>,
<function>mssql_query</function>,
<function>mssql_fetch_field</function>, and
<function>mssql_num_rows</function>.
</para>
</refsect1>
@ -304,7 +446,7 @@
<refentry id="function.mssql-num-rows">
<refnamediv>
<refname>mssql_num_rows</refname>
<refpurpose>get number of rows in result</refpurpose>
<refpurpose>Get number of rows in result</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -313,12 +455,12 @@
<paramdef>string <parameter>result</parameter></paramdef>
</funcsynopsis>
<para>
mssql_num_rows() returns the number of rows in a result set.
<function>Mssql_num_rows</function> returns the number of rows in
a result set.
</para>
<para>
See also:
<function>mssql_db_query</function>,
<function>mssql_query</function> and,
See also: <function>mssql_db_query</function>,
<function>mssql_query</function>, and
<function>mssql_fetch_row</function>.
</para>
</refsect1>
@ -327,64 +469,77 @@
<refentry id="function.mssql-pconnect">
<refnamediv>
<refname>mssql_pconnect</refname>
<refpurpose>open persistent MS SQL connection</refpurpose>
<refpurpose>Open persistent MS SQL connection</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_pconnect</function></funcdef>
<paramdef>string <parameter>servername</parameter></paramdef>
<paramdef>string <parameter>username</parameter></paramdef>
<paramdef>string <parameter>password</parameter></paramdef>
<paramdef>string
<parameter><optional>servername</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>username</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>password</optional></parameter>
</paramdef>
</funcsynopsis>
<para>
Returns: A positive MS SQL persistent link identifier on success,
or false on error</para>
or false on error.
</para>
<para>
mssql_pconnect() acts very much like
<function>mssql_connect</function> with two major differences.</para>
<function>Mssql_pconnect</function> acts very much like
<function>mssql_connect</function> with two major differences.
</para>
<para>
First, when connecting, the function would first try to find a
(persistent) link that's already open with the same host,
username and password. If one is found, an identifier for it
will be returned instead of opening a new connection.</para>
will be returned instead of opening a new connection.
</para>
<para>
Second, the connection to the SQL server will not be closed when
the execution of the script ends. Instead, the link will remain
open for future use (<function>mssql_close</function> will not
close links established by <literal>mssql_pconnect()</literal>).</para>
close links established by <function>mssql_pconnect</function>).
</para>
<para>
This type of links is therefore called 'persistent'.</para>
This type of links is therefore called 'persistent'.
</para>
</refsect1>
</refentry>
<refentry id="function.mssql-query">
<refnamediv>
<refname>mssql_query</refname>
<refpurpose>send MS SQL query</refpurpose>
<refpurpose>Send MS SQL query</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_query</function></funcdef>
<paramdef>string <parameter>query</parameter></paramdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
<paramdef>int
<parameter><optional>link_identifier</optional></parameter>
</paramdef>
</funcsynopsis>
<para> Returns: A positive MS SQL result identifier on success, or
false on error.
<para>
Returns: A positive MS SQL result identifier on success, or false
on error.
</para>
<para> mssql_query() sends a query to the currently active
database on the server that's associated with the specified link
identifier. If the link identifier isn't specified, the last
opened link is assumed. If no link is open, the function tries to
establish a link as if <function>mssql_connect</function> was
called, and use it.
<para>
<function>Mssql_query</function> sends a query to the currently
active database on the server that's associated with the
specified link identifier. If the link identifier isn't
specified, the last opened link is assumed. If no link is open,
the function tries to establish a link as if
<function>mssql_connect</function> was called, and use it.
</para>
<para>
See also:
<function>mssql_db_query</function>,
<function>mssql_select_db</function>, and
See also: <function>mssql_db_query</function>,
<function>mssql_select_db</function>, and
<function>mssql_connect</function>.
</para>
</refsect1>
@ -393,7 +548,7 @@
<refentry id="function.mssql-result">
<refnamediv>
<refname>mssql_result</refname>
<refpurpose>get result data</refpurpose>
<refpurpose>Get result data</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -403,29 +558,30 @@
<paramdef>int <parameter>i</parameter></paramdef>
<paramdef>mixed <parameter>field</parameter></paramdef>
</funcsynopsis>
<para> Returns: The contents of the cell at the row and offset in
the specified MS SQL result set.
<para>
Returns: The contents of the cell at the row and offset in the
specified MS SQL result set.
</para>
<para>
mssql_result() returns the contents of one cell from a MS SQL
result set. The field argument can be the field's offset, or the
field's name, or the field's table dot field's name
(fieldname.tablename). If the column name has been aliased
('select foo as bar from...'), use the alias instead of the
column name.
<function>Mssql_result</function> returns the contents of one
cell from a MS SQL result set. The field argument can be the
field's offset, or the field's name, or the field's table dot
field's name (fieldname.tablename). If the column name has been
aliased ('select foo as bar from...'), use the alias instead of
the column name.
</para>
<para>
When working on large result sets, you should consider using one
of the functions that fetch an entire row (specified below). As
these functions return the contents of multiple cells in one
function call, they're MUCH quicker than mssql_result(). Also,
note that specifying a numeric offset for the field argument is
much quicker than specifying a fieldname or tablename.fieldname
argument.
function call, they're MUCH quicker than
<function>mssql_result</function>. Also, note that specifying a
numeric offset for the field argument is much quicker than
specifying a fieldname or tablename.fieldname argument.
</para>
<para>
Recommended high-performance alternatives:
<function>mssql_fetch_row</function>,
<function>mssql_fetch_row</function>,
<function>mssql_fetch_array</function>, and
<function>mssql_fetch_object</function>.
</para>
@ -435,22 +591,26 @@
<refentry id="function.mssql-select-db">
<refnamediv>
<refname>mssql_select_db</refname>
<refpurpose>select MS SQL database</refpurpose>
<refpurpose>Select MS SQL database</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>mssql_select_db</function></funcdef>
<paramdef>string <parameter>database_name</parameter></paramdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
<paramdef>int
<parameter><optional>link_identifier</optional></parameter>
</paramdef>
</funcsynopsis>
<para> Returns: true on success, false on error
</para>
<para> mssql_select_db() sets the current active database on the
server that's associated with the specified link identifier. If
no link identifier is specified, the last opened link is assumed.
If no link is open, the function will try to establish a link as
if <function>mssql_connect</function> was called, and use it.
<para>
<function>Mssql_select_db</function> sets the current active
database on the server that's associated with the specified link
identifier. If no link identifier is specified, the last opened
link is assumed. If no link is open, the function will try to
establish a link as if <function>mssql_connect</function> was
called, and use it.
</para>
<para>
Every subsequent call to <function>mssql_query</function> will be
@ -476,7 +636,7 @@ sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil