Operation steps for the database:
Port number: 0 to 65535
3306: default port number for MySQL database (modifiable)
mysql_connect ("Native address ","user name", "Password",);
New_link: If you call mysql_connect () for the second time with the same parameters , no new connection will be made and the connection ID that is already open will be returned. The parameter new_link changes This behavior and causes mysql_connect () to always open a new connection, even when mysql_connect () Was previously called with the same parameters.
Client_flags: The parameter can be a combination of the following constants : Mysql_client_ssl, mysql_client_compress, mysql_client_ignore_space or mysql_client_interactive . See MySQL Client Constants for further information.
Return value: Returns a MySQL connection ID If successful , or FALSE on failure.
TCP protocol: The default protocol, one port corresponding to open an application.
API (Application Programming Interface): The content that is called for a specific task.
mysql_select_db ("database name", "MySQL connection.") " ) to set the current activation database on the server associated with the specified connection identifier.
return upon success TRUE , or FALSE on failure.
mysql_query (" SQL query Statement "," MySQL connection ");
return Value: return on successful execution TRUE to return FALSE On error.
Mysql_fetch_array: Gets a row from the result set as an associative array, or as a numeric array, or both.
The default value for this parameter is Mysql_both. If you use mysql_both, you will get an array that contains both associative and numeric indexes. Use mysql_assoc to get the associated index only . use mysql_num only to get a numeric index (as in mysql_fetch_row () ).
Mysql_close (MySQL connection)- close the mysql connection .
If Link_identifier is not specified , the last open connection is closed. mysql_close () is usually not required because a non-persistent connection that has been opened is automatically closed after the script has finished executing .
PHP Connection Data Operation steps