本文整理汇总了PHP中model::getById方法的典型用法代码示例。如果您正苦于以下问题:PHP model::getById方法的具体用法?PHP model::getById怎么用?PHP model::getById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model::getById方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getById
public function getById($id)
{
parent::getById($id);
// TODO: Change the autogenerated stub
}
示例2: rand
}
$password = '';
for ($i = 0; $i <= 6; $i++) {
if (rand(1, 2) == 1) {
$password .= $letters[rand(1, 40)];
} else {
$password .= rand(1, 9);
}
}
$row['user_pass'] = md5($password);
if (strtolower($_POST['user_email']) == strtolower($u['user_email']) && $_POST['user_login'] == $u['user_login']) {
$row = array();
unset($password);
$row['ID'] = $u['ID'];
}
$row['sdate'] = date('Y-m-d H:i:s');
$id = $model->insert($row);
$user = $model->getById($id);
require_once ROOT_DIR . 'mail_generator.php';
send($user['user_email'], 'Here are Your Next Steps', 'subscribe', $user, array('password' => $password));
$_SESSION['user_email'] = $_POST['user_email'];
$_SESSION['user_id'] = $id;
header('Location: challenge/success.php');
}
}
require_once ROOT_DIR . 'mobile_detect.php';
$detect = new mobile_detect();
if ($detect->isMobile() || $detect->isTablet()) {
$mobile = true;
}
require_once ROOT_DIR . 'templates/index.php';
示例3: model
<?php
/**
* Created by PhpStorm.
* User: novichkov
* Date: 24.12.14
* Time: 21:58
*/
session_start();
require_once 'model.php';
require_once 'mailing_data.php';
$model = new model('wp_users');
$user = $model->getById($_GET['uid']);
if (!$user || !md5($user['user_email']) == $_GET['hash']) {
echo 'wrong mail';
exit;
// header('Location: http://1000lbschallenge.com/wp-login/');
// exit;
}
if ($_GET['day'] > $user['sent']) {
echo 'wrong day';
// header('Location: http://1000lbschallenge.com/wp-login/');
// exit;
}
$subject = $data[$_GET['day']]['subject'];
if (!$subject) {
echo 'no subject';
exit;
// header('Location: http://1000lbschallenge.com/404/');
// exit;
}