(1) mysql_connect (host, user name, password); returns a connection number. note: the passwords of mysql users can change with the IP address of the user's machine. in addition, mSQL does not have a user name mechanism, so msql_connect only needs one host parameter. the host can(1) mysql_connect (host, user name, password );
Returns a connection number.
Note: the passwords of mysql users can change with the IP address of the user's machine.
In addition, mSQL does not have a user name mechanism, so msql_connect only needs one host parameter.
The host can be an IP address or domain name.
(2) mysql_create_db (database name );
(3) mysql_select_db (database name, connection number );
Connect to a database.
(4) mysql_query (SQL statement, connection number );
If the SQL statement is select, a result number is returned. Otherwise, the returned value can be ignored.
If it fails, false is returned.
(5) mysql_fetch_array (result number );
Retrieves the next row and returns an array. you can use the number subscript to visit (the first field is the subscript ).
0), you can also use the string subscript to visit (that is, the names of each field in the application ).
If the last row is obtained, false is returned.
(6) mysql_fetch_field (result number, [field serial number]);
If there is no field serial number, take the next field.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service