Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save juananruiz/346267 to your computer and use it in GitHub Desktop.
Save juananruiz/346267 to your computer and use it in GitHub Desktop.
<?php
class indicador extends ADOdb_Active_Record
{
var $_table = 'indicador';
// Obtiene los valores
function obtener_valores()
{
$datos = array();
$db = $this->DB();
$query = "SELECT * FROM valor";
$resultado = $db->Execute($query);
while (!$resultado->EOF)
{
$datos[$resultado->fields['fecha_recogida']] = $resultado->fields;
$resultado->MoveNext();
}
if (sizeof($datos) > 0)
{
$this->valores = $datos;
return true;
}
else
{
return false;
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment