Describe MySQL Connection using PHP Script.
Answer
Establishing connection to MySQL database using PHP can be done by using
mysql_connect(server,user,passwd,new_link,client_flag).
Here, server specifies the host name where the databae is present.
User and password is the user name and password to connect.
New_link if specified will not require a connection again.
Client_flag can take a number of values like MySQL_CLIENT_SSL,
MYSQL_CLIENT_COMPRESS, MYSQL_CLIENT_IGNORE_SPACE, MYSQL_CLIENT_INTERACTIVE.
It is a good practice to close the connection using mysql_close()
More MySQL Links
Describe
MyISAM table.
Answer - In MySQL MyISAM is the default storage engine. MyISAM
tables........
What
is the difference between CHAR_LENGTH and LENGTH?
Answer - CHAR_LENGTH includes leading and trailing blanks and
the string-termination.......
Describe
MySQL Connection using mysql binary.
Answer - Establishing connection to MySQL database using Mysql
binary........
Describe
MySQL Connection using PHP Script.
Answer -
Establishing connection to MySQL database using PHP can be done...........
|