本文整理匯總了PHP中connection::rawQry方法的典型用法代碼示例。如果您正苦於以下問題:PHP connection::rawQry方法的具體用法?PHP connection::rawQry怎麽用?PHP connection::rawQry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類connection
的用法示例。
在下文中一共展示了connection::rawQry方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loginAction
public function loginAction($params)
{
$db = new connection();
$user_name = $params['user_name'];
$tableName = $this->table_name;
$password = $db->encodeData($params['password']);
$rawQry = "SELECT * FROM `system_user` WHERE 1 and `flag`=0 and `user_name`='{$user_name}' and `password`='{$password}'";
$res = $db->rawQry($rawQry);
if ($res == true) {
$sys_user = new SystemUserConrtoller();
$user_data = $sys_user->selectAction($where = " `flag`=0 and `user_name`='{$user_name}' and `password`='{$password}'");
$_SESSION['sys_user_id'] = $user_data[0]['sys_user_id'];
$_SESSION['sys_user_name'] = $user_data[0]['sys_name'];
$_SESSION['sys_role_id'] = $user_data[0]['sys_role_id'];
header("Location:index.php");
} else {
$msg = "Invalid Username and Password!";
return $msg;
}
}