Location: PHPKode > projects > Easysite > easysite/include/database_specific_config/connexion_mysql.inc
<?

// this function connects to the mysql database

function connection($name, $user, $passwd, $host)
{
   return (mysql_connect($host,$user,$passwd));
}

// this fonction queries mysql with the given sql query

function requette($database,$lh,$sql)
{
//   echo "$database <BR> $lh <BR> $sql <BR>";
    
    if (strcmp($database,'') == 0)
       return (mysql_query($sql,$lh));
    else
       return (mysql_db_query($database,$sql,$lh));
}

// this fonction fetch the result given by mysql after a properly made query

function recuperer($resultat)
{
   return (mysql_fetch_row($resultat));
}

function terminer_requette($resultat)
{
   mysql_free_result($resultat);
}


//used to deconnect from mysql

function deconnection($link)
{
  mysql_close($link);
}

?>	
Return current item: Easysite