Location: PHPKode > projects > RosInfo > rosinfo-1.30/include/db.inc
<?
$g_link = false;
function GetMyConnection()
{
  /**
   * Mysql configuration
   **/
  $db_host="localhost";
  $db_user="rosinfo";
  $db_password="rosinfo";
  $db_database="rosinfo";


  global $g_link;

  if($g_link)
    return $g_link;
  $g_link = mysql_connect($db_host, $db_user, $db_password) or die('Could not connect to server.' );
  mysql_select_db($db_database, $g_link) or die('Could not select database.');
  return $g_link;
}

function CleanUpDB()
{
  global $g_link;
  if( $g_link != false )
    mysql_close($g_link);
  $g_link = false;
}
    
?>
Return current item: RosInfo