本文整理汇总了PHP中Usuarios::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Usuarios::select方法的具体用法?PHP Usuarios::select怎么用?PHP Usuarios::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Usuarios
的用法示例。
在下文中一共展示了Usuarios::select方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postEntrar
public function postEntrar()
{
$dadosAcesso = Input::all();
$validador = Validator::make($dadosAcesso, $this->regra_login);
if ($validador->fails()) {
return Redirect::to('login')->withErrors($validador)->withInput();
}
$usuarios = Usuarios::select('email')->where('email', $dadosAcesso['login_acesso'])->where('senha', $dadosAcesso['senha_acesso'])->get();
Route::get('login', array('uses' => 'HomeController@showWelcome'));
//return View::make('HomeController@showWelcome');
//return View::make('login.login', compact('usuarios'));
}
示例2:
$result = $users->update($id);
break;
case "delete":
$am->access(PERMS_ADMIN);
$result = $users->delete($id);
break;
case "password":
$result = $am->setPassword($id, $pass, $sk);
break;
// access checks are done inside method
// access checks are done inside method
case "selectbyid":
$result = $users->selectByID($id);
break;
case "select":
$result = $users->select();
break;
// list with order, index, count and where
// list with order, index, count and where
case "enumerate":
$result = $users->enumerate();
break;
// list with where
// list with where
case "login":
$result = $am->login($user, $pass, $sid);
break;
case "pwcheck":
$result = $am->checkPassword($user, $pass);
break;
// just check pass, dont create session
示例3: Usuarios
<?php
require_once 'variaveis.php';
require_once 'core/Usuarios.php';
$user = new Usuarios();
if (isset($_GET['del'])) {
$user->setId_usuario($_GET['del']);
$user->delete();
}
if (isset($_GET['edit'])) {
$user->setUsuario($_GET['edit']);
$user->update();
}
if (isset($_POST['usuario']) and isset($_POST['nome']) and isset($_POST['senha']) and isset($_POST['tipo']) and !isset($_GET['editar'])) {
$user->setNome($_POST['nome']);
$user->setUsuario($_POST['usuario']);
$user->setSenha(md5($_POST['senha']));
$user->setId_tipo($_POST['tipo']);
$user->insert();
}
$smarty->assign("lista", $user->select());
$smarty->assign("nome", "Usuários");
$smarty->display("usuarios.tpl");