下载
文档
参与
帮助
全栈开发网
基金会
Search docs
PHP 8.4.2 Released!
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
User Submitted Data
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
Introduction »
« Warning::__construct
PHP Manual
Function Reference
Database Extensions
Vendor Specific Database Extensions
MySQL
Change language:
English
German
Spanish
French
Italian
Japanese
Brazilian Portuguese
Russian
Turkish
Ukrainian
Chinese (Simplified)
Other
Original MySQL API
Introduction
Installing/Configuring
Requirements
Installation
Runtime Configuration
Resource Types
Changelog
Predefined Constants
Examples
MySQL extension overview example
MySQL Functions
mysql_affected_rows
— Get number of affected rows in previous MySQL operation
mysql_client_encoding
— Returns the name of the character set
mysql_close
— Close MySQL connection
mysql_connect
— Open a connection to a MySQL Server
mysql_create_db
— Create a MySQL database
mysql_data_seek
— Move internal result pointer
mysql_db_name
— Retrieves database name from the call to mysql_list_dbs
mysql_db_query
— Selects a database and executes a query on it
mysql_drop_db
— Drop (delete) a MySQL database
mysql_errno
— Returns the numerical value of the error message from previous MySQL operation
mysql_error
— Returns the text of the error message from previous MySQL operation
mysql_escape_string
— Escapes a string for use in a mysql_query
mysql_fetch_array
— Fetch a result row as an associative array, a numeric array, or both
mysql_fetch_assoc
— Fetch a result row as an associative array
mysql_fetch_field
— Get column information from a result and return as an object
mysql_fetch_lengths
— Get the length of each output in a result
mysql_fetch_object
— Fetch a result row as an object
mysql_fetch_row
— Get a result row as an enumerated array
mysql_field_flags
— Get the flags associated with the specified field in a result
mysql_field_len
— Returns the length of the specified field
mysql_field_name
— Get the name of the specified field in a result
mysql_field_seek
— Set result pointer to a specified field offset
mysql_field_table
— Get name of the table the specified field is in
mysql_field_type
— Get the type of the specified field in a result
mysql_free_result
— Free result memory
mysql_get_client_info
— Get MySQL client info
mysql_get_host_info
— Get MySQL host info
mysql_get_proto_info
— Get MySQL protocol info
mysql_get_server_info
— Get MySQL server info
mysql_info
— Get information about the most recent query
mysql_insert_id
— Get the ID generated in the last query
mysql_list_dbs
— List databases available on a MySQL server
mysql_list_fields
— List MySQL table fields
mysql_list_processes
— List MySQL processes
mysql_list_tables
— List tables in a MySQL database
mysql_num_fields
— Get number of fields in result
mysql_num_rows
— Get number of rows in result
mysql_pconnect
— Open a persistent connection to a MySQL server
mysql_ping
— Ping a server connection or reconnect if there is no connection
mysql_query
— Send a MySQL query
mysql_real_escape_string
— Escapes special characters in a string for use in an SQL statement
mysql_result
— Get result data
mysql_select_db
— Select a MySQL database
mysql_set_charset
— Sets the client character set
mysql_stat
— Get current system status
mysql_tablename
— Get table name of field
mysql_thread_id
— Return the current thread ID
mysql_unbuffered_query
— Send an SQL query to MySQL without fetching and buffering the result rows
Found A Problem?
Learn How To Improve This Page
•
Submit a Pull Request
•
Report a Bug
+
add a note
User Contributed Notes
There are no user contributed notes for this page.
↑
and
↓
to navigate •
Enter
to select •
Esc
to close
Press
Enter
without selection to search using Google