Un poco de codigo
Código PHP:
<?php
class fileSql{
public $atrID;
public $table;
public $exist;
public $id;
public function __construct($id){
$this->id = (int) $id;
$this->exist = $this->getExist();
$this->table;
echo "cargado";
$this->atrID = Array(
"id" => "f_id",
"nombre" => "f_archivo",
"directorio" => "f_dir",
"fechaH" => "f_date",
"tamano" => "f_size",
"por" => "f_byid",
"tipo" => "f_type"
);
var_dump($this->atrID);
}
//Verificamos si el archivo se encuentra registrado en la Mysql
public function getExist(){
var_dump($this->atrID);// Esto me da Null
$query = sprintf("SELECT %s FROM %s WHERE %s=%d",$this->atrID['id'],$this->table,$this->atrID['id'],$this->id);
$sql = mysql_query($query);
if($sql && mysql_num_rows($sql) > 0){
return true;
}
return true;
}
}
?>
Bueno desde ya agradesco mucho su ayuda.
PD: Disculpen las molestia me di cuenta de un error muy grabe que cometi , hoy fue un dia cumplicado.