Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/01/2016, 23:43
Avatar de mazaku
mazaku
 
Fecha de Ingreso: septiembre-2009
Ubicación: Veracruz
Mensajes: 104
Antigüedad: 14 años, 7 meses
Puntos: 0
Pregunta error de conexion

buenas noche tengo el siguiente error en este código de conexión a una base de datos y no se como corregirlo

Código:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u351714769/public_html/classes/class.db.php on line 50
el codigo de conexion es est
Código PHP:
Create the connection to the database
    
*
    * @return 
void
    
*/
        public function 
Connect() {
            
$result false;
            
$this->connection mysql_connect(APP_DB_HOSTAPP_DB_USERAPP_DB_PASSWORD);
            if(
$this->connection) {
                
$select_db mysql_select_db(APP_DB_NAME$this->connection);
                
// mysql_set_charset('utf8', $this->connection);
                
if($select_db) {
                    
$result true;
                } else {
                    if(
$this->show_errors)
                        die(
mysql_error());
                }
            } else {
                if(
$this->show_errors)
                    die(
mysql_error());
            }
            return 
$result;
        }
        
    
/**
    * This closes a database connection 
la linea 50 es esta parte

Código PHP:
$this->connection mysql_connect(APP_DB_HOSTAPP_DB_USERAPP_DB_PASSWORD); 
por favor podrían ayudarme a evitar que salga el mensaje de Deprecated: mysql_connect()


saludos y gracias por su apoyo