<?php
/*
* Project: AX MVC
* File : /models/Classificado.php
* Purpose : model for the error controller.
* Author : Axel Alexander Martins Benites
*/
require_once 'bootstrap.php';
require_once 'ConnectionFactory.php';
require_once 'entities/Notificacao.php';
#1 - conectar ao mysql
#2 - criar a tabela Notifica??o
// repositorio
$retorno = ConnectionFactory::getInstance()->RepositoryfindBy('Notificacao',
array('usuario' => $id , 'id' => 2),
array('id'=>'DESC'), null, null );
print_r ( $retorno ) ;
// query
function getAll($id){
$strSql = "SELECT n from Notificacao n WHERE n.id = :id ";
$setParam = array("id" => $id);
return ConnectionFactory::getInstance()->criarQuery(
$strSql , $setParam , 2);
}
$retorno = getAll(1);
print_r ( $retorno ) ;
|