To work with MySQL, you can use the tools built into the PHP language, which are already supported by the hosting. PHP has a developed and understandable interface to this DBMS, which makes working with MySQL from PHP the simplest and most convenient, especially for novice webmasters and web programmers.

# connect to the server and select your database
mysql_connect("localhost","login_u12345","password");
mysql_select_db("database");

# prepare and execute a query to the database
$query = "SELECT * FROM table";
$result = mysql_query($query)
or die(mysql_error());

# display the results of executing the request
while($i = mysql_fetch_row($result)) {
echo $i[0];
echo $i[1];
.....
Was this answer helpful? 55 Users Found This Useful (203 Votes)