Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/06/2008, 14:25
jufena84
 
Fecha de Ingreso: mayo-2008
Ubicación: Sevilla - España
Mensajes: 140
Antigüedad: 16 años
Puntos: 1
Problema: Fatal error: Call to a member function getConexionV() on a non-object

Buenas lo que pasa es que tengo una clase administrador y esta se trata de conectar a la base de datos el codigo es este:
Código PHP:
<?php 
include("../Modelo/conectar.php");

class 
Administrador{

Var 
$Nombre;
var 
$Apellido;
var 
$Cedula;
var 
$Direccion;
var 
$Telefono;
var 
$Celular;
var 
$Nick;
var 
$Contrasena;

function 
Administrador(){
}

function 
setNombre($Nombre2){
$this->Nombre=$Nombre2;
}
function 
setApellido($Apellido2){
$this->Apellido=$Apellido2;
}
function 
setDireccion($Direccion2){
$this->Direccion=$Direccion2;
}
function 
setCedula($Cedula2){
$this->Cedula=$Cedula2;
}
function 
setTelefono($Telefono2){
$this->Telefono=$Telefono2;
}
function 
setCelular($Celular2){
$this->Celular=$Celular2;
}
function 
setContrasena($Contrasena2){
$this->Contrasena=$Contrasena2;
}
function 
setNick($Nick2){
$this->Nick=$Nick2;
}

function 
getNombre(){
return 
$this->Nombre;
}
function 
getApellido(){
return 
$this->Apellido;
}
function 
getDireccion(){
return 
$this->Direccion;
}
function 
getCedula(){
return 
$this->Cedula;
}
function 
getTelefono(){
return 
$this->Telefono;
}
function 
getCelular(){
return 
$this->Celular;
}
function 
getContrasena(){
return 
$this->Contrasena;
}
function 
getNick(){
return 
$this->Nick;
}

function 
LoguinAdmin($usua,$con){
$bd = new conectar();
$bd->conectarse();
$sw=0;
 
$sql mysql_query("SELECT * FROM administrador WHERE Nick= '".$usua."' AND  Contrasena= '".$con."'",$bd->getConexionV());
       while(
$resp=mysql_fetch_row($sql)){ 
       for(
$j=0;$j<mysql_num_fields($sql);$j++){
              
$sw=1;
                
$this->setNick($resp[0]);
                
$this->setContrasena($resp[1]); 
                
$this->setNombre($resp[2]); 
                
$this->setApellido($resp[3]);
                
$this->setCedula($resp[4]); 
           }
            }    
            return 
$sw;
}

}
como pueden ver incluyo la clse conectar pero me genera el siguiente error

Fatal error: Call to a member function getConexionV() on a non-object in C:\AppServ\www\STR\Controladores\Administrador.php on line 72
cual sera el problema podrian ayudarme
DIos los bendiga