Example #1
0
 /**
  * version_mysql
  * Retourne une chaîne indiquant la version courante du serveur MySQL.
  * Voir http://dev.mysql.com/doc/refman/5.0/fr/information-functions.html
  *
  * @param void
  * @return string
  */
 private static function version_mysql()
 {
   $mysql_version = defined('SACOCHE_STRUCTURE_BD_NAME') ? DB_STRUCTURE_COMMUN::DB_recuperer_version_MySQL() : DB_WEBMESTRE_PUBLIC::DB_recuperer_version_MySQL() ;
   if(version_compare($mysql_version,MYSQL_VERSION_MINI_CONSEILLEE,'>=')) return InfoServeur::cellule_coloree_centree($mysql_version,'vert');
   if(version_compare($mysql_version,MYSQL_VERSION_MINI_REQUISE   ,'>=')) return InfoServeur::cellule_coloree_centree($mysql_version,'jaune');
                                                                          return InfoServeur::cellule_coloree_centree($mysql_version,'rouge');
 }
Example #2
0
/**
 * version_mysql
 * Retourne une chaîne indiquant la version courante du serveur MySQL.
 * Voir http://dev.mysql.com/doc/refman/5.0/fr/information-functions.html
 *
 * @param void
 * @return string
 */

function version_mysql()
{
	$version = defined('SACOCHE_STRUCTURE_BD_NAME') ? DB_STRUCTURE_COMMUN::DB_recuperer_version_MySQL() : DB_WEBMESTRE_PUBLIC::DB_recuperer_version_MySQL() ;
	$fin = strpos($version,'-');
	return ($fin) ? substr($version,0,$fin) : $version;
}