How to work with MySQL from PHP scripts

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

# connect to the server and select your
mysql_connect database("u12345.mysql.hostetski.ru ","u12345","password");
mysql_select_db("database");

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

# output the results of the query execution
while($and = mysql_fetch_row($result)) {
echo $i[0];
echo $i[1];
.....
}