Tema: mvc php
Ver Mensaje Individual
  #23 (permalink)  
Antiguo 20/07/2013, 14:51
Avatar de miguec04
miguec04
 
Fecha de Ingreso: agosto-2008
Ubicación: Cimitarra, Santander
Mensajes: 378
Antigüedad: 16 años, 5 meses
Puntos: 15
Respuesta: mvc php

oye oscard41 ya detecte tu error, bueno creo es ese, a continuación te muestro.

Código PHP:
Ver original
  1. public function conexionDB(){
  2.        
  3.        $this->server= $this->leerIni("Config","MYSQL","Server");
  4.        $this->user= $this->leerIni("Config","MYSQL","User");
  5.        $this->clave= $this->leerIni("Config","MYSQL","Clave");
  6.  
  7. //DESDE AQUI HA DE EMPEZAR EL ERROR, la conexion la estas haciendo en una variable local
  8. //no estas haciendo la conexion en el atributo conexion que creaste y me imagino que cuando //llamas esta conexion para hacer el query en el modelo o en el controlador, te esta llegando //vacio
  9. //espero  que esto haya sido
  10.        $conexion= mysql_connect($this->server,$this->user,$this->clave);
  11.  
  12.        if($conexion){
  13.          $this->DB= $this->leerIni("Config","MYSQL","DB");
  14.          mysql_select_db($this->DB);
  15.        }else{
  16.          return "Error";
  17.        }
  18.     }
__________________
Desoftc Technology - Miguel Carmona
Creaciones Inteligentes - Cimitarra Colombia
[email protected]
http://www.desoftc.com.co