Código PHP:
<?php
class Conexion
{
private $cn;
private $rs;
private $servidor;
private $usuario;
private $password;
private $bd;
public function __construct($servidor = "192.168.1.122:3306", $usuario = "192.168.1.70", $password = "EMHLAB2010", $bd = "sie")
{
$this->servidor = $servidor;
$this->usuario = $usuario;
$this->password = $password;
$this->bd = $bd;
$this->cn = new mysqli($servidor, $usuario, $password, $bd);
}
public function dbExecute($query)
{
$this->rs = $this->cn->query($query);
return $this->rs;
}
public function getInsertedId()
{
return $this->cn->insert_id;
}
public function afectados()
{
return $this->cn->affected_rows;
}
protected function clean($value)
{
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
$value = mysql_real_escape_string(htmlspecialchars($value));
$value=addslashes($value);
return $value;
}
public function __destruct()
{
$this->cn;
}
}
?>
Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2005): Unknown MySQL server host '192.168.1.122:3306' (11004) in C:\AppServ\www\sie\clases\Conexion.class.php on line 17
Warning: mysqli::query() [mysqli.query]: Empty query in C:\AppServ\www\sie\clases\Conexion.class.php on line 21
Fatal error: Call to a member function fetch_assoc() on a non-object in C:\AppServ\www\sie\index1.php on line 10
alguien podria decirme a que se debe, ayuda por favor, necesito hacerlo, gracias de antemano