📄 php_ref_mysql.asp
字号:
</tr>
<tr>
<td valign="top">mysql.default_socket</td>
<td valign="top">NULL</td>
<td valign="top">The default socket name to use. Available since PHP
4.0.1</td>
<td valign="top">PHP_INI_ALL</td>
</tr>
<tr>
<td valign="top">mysql.default_host</td>
<td valign="top">NULL</td>
<td valign="top">The default server host to use (doesn't apply in SQL safe
mode)</td>
<td valign="top">PHP_INI_ALL</td>
</tr>
<tr>
<td valign="top">mysql.default_user</td>
<td valign="top">NULL</td>
<td valign="top">The default user name to use (doesn't apply in SQL safe
mode)</td>
<td valign="top">PHP_INI_ALL</td>
</tr>
<tr>
<td valign="top">mysql.default_password</td>
<td valign="top">NULL</td>
<td valign="top">The default password to use (doesn't apply in SQL safe mode)</td>
<td valign="top">PHP_INI_ALL</td>
</tr>
<tr>
<td valign="top">mysql.connect_timeout</td>
<td valign="top">"60"</td>
<td valign="top">Connection timeout in seconds</td>
<td valign="top">PHP_INI_ALL</td>
</tr>
</table>
<br />
<hr />
<h2>Resource Types</h2>
<p>There are two resource types used in the MySQL extension. The first one is the
link_identifier for a database connection, the second is a resource which holds the
result of a query.</p>
<p><b>Note:</b> Most MySQL functions accept link_identifier as the last optional
parameter. If it is not provided, the last opened connection is used.</p>
<hr />
<h2>PHP MySQL Functions</h2>
<p><b>PHP</b>: indicates the earliest version of PHP that supports the
function.</p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table4">
<tr>
<th width="35%" align="left" valign="top">Function</th>
<th width="60%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">PHP</th>
</tr>
<tr>
<td valign="top"><a href="func_mysql_affected_rows.asp">mysql_affected_rows()</a></td>
<td valign="top">Returns the number of affected rows in the previous MySQL operation</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_change_user()</td>
<td valign="top"><span class="red">Deprecated.</span> Changes the user of the current MySQL
connection</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_client_encoding.asp">
mysql_client_encoding()</a></td>
<td valign="top">Returns the name of the character set for the current
connection</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_close.asp">mysql_close()</a></td>
<td valign="top">Closes a non-persistent MySQL connection</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_connect.asp">mysql_connect()</a></td>
<td valign="top">Opens a non-persistent MySQL connection</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_create_db()</td>
<td valign="top"><span class="red">Deprecated.</span> Creates a new MySQL database. Use mysql_query()
instead</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_data_seek.asp">mysql_data_seek()</a></td>
<td valign="top">Moves the record pointer</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_db_name.asp">mysql_db_name()</a></td>
<td valign="top">Returns a database name from a call to mysql_list_dbs()</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_db_query()</td>
<td valign="top"><span class="red">Deprecated.</span> Sends a MySQL query. Use mysql_select_db() and
mysql_query() instead</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_drop_db()</td>
<td valign="top"><span class="red">Deprecated.</span> Deletes a MySQL database. Use mysql_query()
instead</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_errno.asp">mysql_errno()</a></td>
<td valign="top">Returns the error number of the last MySQL operation</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_error.asp">mysql_error()</a></td>
<td valign="top">Returns the error description of the last MySQL operation</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_escape_string()</td>
<td valign="top"><span class="red">Deprecated.</span> Escapes a string for use in a mysql_query. Use
mysql_real_escape_string() instead</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_array.asp">mysql_fetch_array()</a></td>
<td valign="top">Returns a row from a recordset as an associative array
and/or a numeric array</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_assoc.asp">mysql_fetch_assoc()</a></td>
<td valign="top">Returns a row from a recordset as an associative array</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_field.asp">mysql_fetch_field()</a></td>
<td valign="top">Returns column info from a recordset as an
object</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_lengths.asp">mysql_fetch_lengths()</a></td>
<td valign="top">Returns the length of the contents of each field in a
result row</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_object.asp">mysql_fetch_object()</a></td>
<td valign="top">Returns a row from a recordset as an object</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_fetch_row.asp">mysql_fetch_row()</a></td>
<td valign="top">Returns a row from a recordset as a numeric array</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_flags.asp">mysql_field_flags()</a></td>
<td valign="top">Returns the flags associated with a field in a
recordset</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_len.asp">mysql_field_len()</a></td>
<td valign="top">Returns the maximum length of a field in a recordset</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_name.asp">mysql_field_name()</a></td>
<td valign="top">Returns the name of a field in a recordset</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_seek.asp">mysql_field_seek()</a></td>
<td valign="top">Moves the result pointer to a specified field</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_table.asp">mysql_field_table()</a></td>
<td valign="top">Returns the name of the table the specified field is in</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_field_type.asp">mysql_field_type()</a></td>
<td valign="top">Returns the type of a field in a recordset</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_free_result.asp">mysql_free_result()</a></td>
<td valign="top">Free result memory</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_get_client_info.asp">
mysql_get_client_info()</a></td>
<td valign="top">Returns MySQL client info</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_get_host_info.asp">mysql_get_host_info()</a></td>
<td valign="top">Returns MySQL host info</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_get_proto_info.asp">
mysql_get_proto_info()</a></td>
<td valign="top">Returns MySQL protocol info</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_get_server_info.asp">
mysql_get_server_info()</a></td>
<td valign="top">Returns MySQL server info</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_info.asp">mysql_info()</a></td>
<td valign="top">Returns information about the last query</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_insert_id.asp">mysql_insert_id()</a></td>
<td valign="top">Returns the AUTO_INCREMENT ID generated from the previous INSERT operation</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_list_dbs.asp">mysql_list_dbs()</a></td>
<td valign="top">Lists available databases on a MySQL server</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top">mysql_list_fields()</td>
<td valign="top"><span class="red">Deprecated.</span> Lists MySQL table fields. Use mysql_query()
instead</td>
<td valign="top">3</td>
</tr>
<tr>
<td valign="top"><a href="func_mysql_list_processes.asp">
mysql_list_processes()</a></td>
<td valign="top">Lists MySQL processes</td>
<td valign="top">4</td>
</tr>
<tr>
<td valign="top">mysql_list_tables()</td>
<td valign="top"><span class="red">Deprecated.</span> Lists tables in a MySQL database. Use mysql_query()
instead</td>
<td valign="top">3</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -