Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/02/2014, 23:31
Avatar de arcanisgk122
arcanisgk122
 
Fecha de Ingreso: junio-2010
Mensajes: 755
Antigüedad: 13 años, 11 meses
Puntos: 28
Respuesta: Problemas Con Cotejamiento en la conexión

uno se conecta de esta manera:

Código PHP:
Ver original
  1. $servidor   = 'localhost';
  2.     $usuario    = 'root';
  3.     $clave      = '12345';
  4.     $basedatos  = 'tubasededatos';
  5.     $this->conexion = new mysqli($servidor, $usuario, $clave, $basedatos);
  6.     if ($this->conexion->connect_error)
  7.         exit ("Problema de la Conexion a la Base de Datos: " . $this->conexion->connect_error);
  8.     $this->conexion->query("SET NAMES 'utf8'");
  9.     $dblink=$this->conexion;
  10.     return $dblink;

Compara yo me conecto siempre...

y para cerrar:

Código PHP:
Ver original
  1. mysqli_close($dblink);
__________________
Cooler Master Gladiator 600 - AMD PHENOM II X4 955 @ 3.5GHZ
GA-MA78GM-US2H - Super Talent 800 2GB x 2 Dual, (Unganged)
PSU Cooler Master eXtreme Power Plus 500W - Saphire R7-260OC-2GB