本文整理匯總了PHP中DAOFactory::getUsuariosDAO方法的典型用法代碼示例。如果您正苦於以下問題:PHP DAOFactory::getUsuariosDAO方法的具體用法?PHP DAOFactory::getUsuariosDAO怎麽用?PHP DAOFactory::getUsuariosDAO使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DAOFactory
的用法示例。
在下文中一共展示了DAOFactory::getUsuariosDAO方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: darseDeBaja
function darseDeBaja($idUsuario)
{
DAOFactory::getUsuariosDAO()->baja($idUsuario);
echo "Baja";
}
示例2: count
<br>
<br>
<br>
<br>
<br>
</div>
<br>
<div class="container">
<div class="row">
<div>
<ul class="event-list">
<?php
$codigoUsuario = DAOFactory::getUsuariosDAO()->queryByEmail($_SESSION['EMAIL']);
$array = DAOFactory::getCuponsDAO()->queryByIdCliente($codigoUsuario[0]->id);
$count = count($array);
for ($i = 0; $i < $count; $i++) {
$oferta = DAOFactory::getOfertasDAO()->load($array[$i]->idOferta);
$date = new DateTime($oferta->datafinal);
$dia = $date->format('d');
$mes = $date->format('m');
$ano = $date->format('Y');
$empresa = DAOFactory::getEmpresasDAO()->load($oferta->idCliente);
?>
<li>
示例3: Transaction
<?php
include './generated/include_dao.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['signupform'])) {
try {
$transaction = new Transaction();
$usuario = new Usuario();
$usuario->nome = $_POST['nome'];
$usuario->sobrenome = $_POST['sobrenome'];
$usuario->email = $_POST['email'];
$usuario->senha = md5($_POST['senha']);
$usuario->ativo = 1;
$resultado = DAOFactory::getUsuariosDAO()->insert($usuario);
$transaction->commit();
header('location: usuariocadastradosucesso.php');
} catch (Exception $exc) {
header('location: login.php?msg=error');
}
}
}