kopia lustrzana https://github.com/glidernet/ogn-live
put back old mysql_connect() function for legacy support
rodzic
43e40c5903
commit
b1dd4b1748
18
sql.php
18
sql.php
|
@ -9,3 +9,21 @@ try
|
|||
catch (PDOException $e) {
|
||||
echo 'Connection failed: ' . $e->getMessage();
|
||||
}
|
||||
|
||||
//legacy mysql_connect for non-released code:
|
||||
|
||||
$link;
|
||||
if (!($link = @mysql_connect($cfg['db_host'], $cfg['db_user'], $cfg['db_pass'] ))) //
|
||||
{
|
||||
echo "<BR><BR><CENTER>Connection not possible</CENTER><BR><BR>";
|
||||
@mysql_close($link);
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!(@mysql_select_db ($cfg['db_name'],$link)))
|
||||
{
|
||||
echo "<BR><BR><CENTER>Database access not possible</CENTER><BR><BR>";
|
||||
@mysql_close($link);
|
||||
exit();
|
||||
}
|
||||
// ***************************************************************************
|
||||
|
|
Ładowanie…
Reference in New Issue