D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreVerAval.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreVerBanco * * @copyright (c) year, Carlos Marques - CM */ class GreVerAval { private $Resultado; private $DadosId; public function verAval($DadosId) { $this->DadosId = (int) $DadosId; $verAval = new \App\adms\Models\helper\AdmsRead(); $verAval->fullRead("SELECT resid.*, mask(lpad(resid.cpf,11,0), '###.###.###-##') cpfm, TIMESTAMPDIFF (YEAR, resid.data_nasc, curdate()) anos, TRUNCATE((((TIMESTAMPDIFF (DAY, resid.data_nasc, curdate())/365.25) - (TIMESTAMPDIFF (YEAR, resid.data_nasc, curdate()))) * 12), 0) meses, filial.nome_fantasia filial_nome, sit.nome nome_sit, cr.cor cor_cr FROM gre_residente resid inner join gre_filial filial on filial.id = resid.gre_filial_id INNER JOIN adms_sits sit ON sit.id= resid.adms_sit_id INNER JOIN adms_cors cr ON cr.id= sit.adms_cor_id WHERE resid.id =:id LIMIT :limit", "id=".$this->DadosId."&limit=1"); $this->Resultado= $verAval->getResultado(); return $this->Resultado; } }