Code (27-42):
function xtc_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;
if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username, $password);
mysql_query("SET SESSION sql_mode=''");
} else {
$$link = mysql_connect($server, $username, $password);
mysql_query("SET SESSION sql_mode=''");
}
if ($$link) mysql_select_db($database);
return $$link;
}
This code works with php 5.4, but after update to php 5.5 i have this mistake:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /homepages/33/d183561635/htdocs/xtc.../inc/xtc_db_connect.inc.php on line 34
I understand that mysql is deprecated, but please help, i don´t know what i must exactly do.
How must be the correct code to work with php 5.5?