it's the model
<?php
class Persona extends \Phalcon\Mvc\Model
{
public $PERS_CODIGO;
public $PERS_NOMBRE;
public $PERS_RUCIDE;
public $PERS_TIPOIDE;
public $PERS_TELEFONO;
public $PERS_DIRECCION;
public $PERS_UBICACION;
public $PERS_TIPO;
public $PERS_ETAPA;
public $PERS_CARGO;
public $PERS_FECHACREACION;
public $PERS_FECHACONSOLIDACION;
public $PERS_GANO;
public $PERS_SEXO;
public $PERS_ESTADC;
public $PERS_CORREO;
public $PERS_CELULAR;
public $PERS_CONTACTO;
public $PERS_PROVINCIA;
public $PERS_LINE;
public $PERS_USUARIO;
public $PERS_CONTRASENIA;
public $PERS_FOTO;
public function getSource()
{
return 'persona';
}
public static function find($parameters = null)
{
return parent::find($parameters);
}
public static function findFirst($parameters = null)
{
return parent::findFirst($parameters);
}
}
it's the db.config
<?php
defined('APP_PATH') || define('APP_PATH', realpath('.'));
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'Mysql',
'host' => 'CAJA-PC',
'username' => 'jeiel',
'password' => 'jeiel',
'dbname' => 'redviva',
'charset' => 'utf8',
),
'application' => array(
'controllersDir' => APP_PATH . '/app/controllers/',
'modelsDir' => APP_PATH . '/app/models/',
'migrationsDir' => APP_PATH . '/app/migrations/',
'viewsDir' => APP_PATH . '/app/views/',
'pluginsDir' => APP_PATH . '/app/plugins/',
'libraryDir' => APP_PATH . '/app/library/',
'cacheDir' => APP_PATH . '/app/cache/',
'baseUri' => '/red/',
)
));