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

gracias por la ayuda amigos aunque aun no logro saber como actualizar el codigo, lo he intentado de esta manera

Código PHP:
Create the connection to the database
    
*
    * @return 
void
    
*/
        
        public function 
Connect() {
        
            
$result false;
            
$this->connection = new mysqli(APP_DB_HOSTAPP_DB_USERAPP_DB_PASSWORDAPP_DB_NAME);
            if(
$this->connection) {
                
                
$select_db mysqli_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
    * 
pero ahora me marca el siguiente error

Cita:
Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/u351714769/public_html/classes/class.db.php on line 55
que es esta linea

Código PHP:
$select_db mysqli_select_db(APP_DB_NAME$this->connection); 
ayudenme por favor para saber que es lo que estoy haciendo mal

saludos