Two methods for parsing PHP connection to MYSQL _ MySQL

Source: Internet
Author: User
Tags mysql functions
Two methods for parsing PHP connection to MYSQL: Mysql can be connected to the web through PHP in two ways, one is Mysql-related functions through php, and the other is ODBC-related functions through php.

The related functions are as follows:

MYSQL functions

Mysql_affected_rows: obtain the number of columns affected by the last MySQL operation.

Mysql_close: disconnect the MySQL server.

Mysql_connect: enables connections to the MySQL server.

Mysql_create_db: create a new MySQL database.

Mysql_data_seek: move internal return indicator.

Mysql_db_query: Send the query string to the MySQL database.

Mysql_drop_db: remove the database.

Mysql_errno: return the error code.

Mysql_error: returns an error message.

Mysql_fetch_array: returns the array data.

Mysql_fetch_field: obtains the field information.

Mysql_fetch_lengths: returns the maximum length of data in each column of a single column.

Mysql_fetch_object: returns object data.

Mysql_fetch_row: returns the columns of a single column.

Mysql_field_name: return the name of the specified field.

Mysql_field_seek: set a field from the indicator to the returned value.

Mysql_field_table: obtain the name of the table in the current column.

Mysql_field_type: obtain the current column type.

Mysql_field_flags: obtains the flag of the current field.

Mysql_field_len: get the length of the current column.

Mysql_free_result: releases the memory occupied by the returned data.

Mysql_insert_id: return the ID of the last INSERT command.

Mysql_list_fields: lists the fields of a specified data table ).

Mysql_list_dbs: list available databases of the MySQL server ).

Mysql_list_tables: lists the tables of a specified database ).

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.