本文整理汇总了PHP中MySql::dbupdate方法的典型用法代码示例。如果您正苦于以下问题:PHP MySql::dbupdate方法的具体用法?PHP MySql::dbupdate怎么用?PHP MySql::dbupdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySql
的用法示例。
在下文中一共展示了MySql::dbupdate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
$user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
$loginUrl = $facebook->getLoginUrl(array('scope' => 'email,user_birthday,user_location'));
if ($user) {
//print_r($user_profile);
//LoginAuth::loginUser($user_profile["username"],$_POST['password'],$_POST['remember']);
$username = $user_profile["username"];
$user = MySql::dbselect("id,username,password,codesecurity", "user", "username = '{$username}' OR email = '{$username}'");
if ($user) {
$userid = $user[0][0];
$lastlogin = time();
MySql::dbupdate('user', "lastlogin = '{$lastlogin}'", "id = '{$userid}'");
$_SESSION["RK_Userid"] = $userid;
} else {
$username = $user_profile["username"];
$fullname = $user_profile["name"];
$email = $user_profile["email"];
$facebookurl = 'https://www.facebook.com/' . $user_profile["id"];
$codesecurity = rand(1000, 9999);
$lastreg = time();
MySql::dbinsert("user", "username,email,codesecurity,lastreg,facebookid,fullname", "'{$username}','{$email}','{$codesecurity}','{$lastreg}','{$facebookurl}','{$fullname}'");
$userid = mysql_insert_id();
$_SESSION["RK_Userid"] = $userid;
}
header("Location: " . SITE_URL);
} else {
header("Location: " . $loginUrl);
示例2: display
public static function display($params)
{
$cururl = Url::curRequestURL();
# Actor de caché y el cine
Film_Model::CacheActorSeatch();
# Restablecer Vistas
Film_Model::ResetViewed();
# Get info url
$geturl = explode('/', $cururl);
$mode = $geturl[1];
// Film and cinema
if (in_array($mode, array('phim', 'xem-phim'))) {
$id = $geturl[2];
$id = explode('-', $id);
$id = $id[0];
if ($mode == 'phim') {
$arr = MySql::dbselect('tb_film.id,tb_film.title,tb_film.thumb,tb_film.year,tb_film.big_image,tb_film_other.content,tb_film.title_en,tb_film_other.keywords', 'film JOIN tb_film_other ON (tb_film_other.filmid = tb_film.id)', "id = '{$id}'");
//TITULO PRINCIPAL DE TODA LA WEB
$site_title = 'Pelicula ' . $arr[0][1] . ' | ' . $arr[0][6] . ' full HD';
$site_description = str_replace('"', '', CutName(RemoveHtml(UnHtmlChars($arr[0][5])), 200));
$site_keywords = FixTags($arr[0][7]);
$filmid = intval($arr[0][0]);
$epwatch = MySql::dbselect('id', 'episode', "filmid = '{$filmid}' order by id asc limit 1");
$epwatch = $epwatch[0][0];
} else {
if ($mode == 'xem-phim') {
$epid = MySql::dbselect('id,name,filmid,url,subtitle', 'episode', "id = '{$id}'");
$filmid = intval($epid[0][2]);
MySql::dbupdate('film', "viewed = viewed+100, viewed_day = viewed_day+1, viewed_week = viewed_week+1, viewed_month = viewed_month+1", "id = '{$filmid}'");
$arr = MySql::dbselect('tb_film.id,tb_film.title,tb_film.thumb,tb_film.year,tb_film.big_image,tb_film_other.content,tb_film.title_en,tb_film_other.keywords', 'film JOIN tb_film_other ON (tb_film_other.filmid = tb_film.id)', "id = '{$filmid}'");
$site_title = 'Pelicula ' . $arr[0][1] . ' Tập ' . $epid[0][1] . ' - Pelicula ' . $arr[0][6];
$site_description = 'Pelicula ' . $arr[0][1] . ' Tập ' . $epid[0][1] . ' | ' . $arr[0][6] . ' Ep ' . $epid[0][1] . '. Pelicula ' . $arr[0][1] . ' Tập ' . $epid[0][1] . ' Calidad HD.';
$site_keywords = FixTags('Pelicula ' . $arr[0][1] . ' Tập ' . $epid[0][1] . ', ' . $arr[0][1] . ' Tập ' . $epid[0][1] . ', ' . $arr[0][6] . ' Ep ' . $epid[0][1] . ', ' . $arr[0][7]);
}
}
if (!$arr) {
header('Location: ' . s404_URL);
}
$other_meta = '<meta property="og:image" content="' . $arr[0][2] . '">';
$other_meta2 = '<link href="' . SITE_URL . $cururl . '" rel="canonical">';
include View::TemplateView('film');
} else {
if (in_array($mode, array('danh-sach', 'the-loai', 'quoc-gia', 'search', 'tag'))) {
if ($mode == 'the-loai') {
$id = $geturl[2];
$arr = MySql::dbselect('id,name', 'category', "name_seo = '{$id}'");
$id = $arr[0][0];
$catid = $id;
$name = $arr[0][1];
$url_page = Url::get(0, $name, 'Thể loại');
$site_title = head_site($name, 'category_title');
$site_description = head_site($name, 'category_description');
$site_keywords = head_site($name, 'category_keywords');
$sql = "tb_film.category like '%,{$id},%'";
} else {
if ($mode == 'quoc-gia') {
$id = $geturl[2];
$arr = MySql::dbselect('id,name', 'country', "name_seo = '{$id}'");
$id = $arr[0][0];
$couid = $id;
$name = $arr[0][1];
$url_page = Url::get(0, $name, 'Pais');
$site_title = head_site($name, 'country_title');
$site_description = head_site($name, 'country_description');
$site_keywords = head_site($name, 'country_keywords');
$sql = "tb_film.country = '{$id}'";
} else {
if (in_array($mode, array('search', 'tag'))) {
$id = str_replace('-', ' ', urldecode($geturl[2]));
$name = $id;
$url_page = Url::get(0, $name, 'Search');
$site_title = head_site($name, 'search_title');
$site_description = head_site($name, 'search_description');
$site_keywords = head_site($name, 'search_keywords');
$sql = "tb_film.title like '%{$id}%' OR tb_film.title_en like '%{$id}%' OR tb_film_other.searchs like '%{$id}%' OR tb_film_other.keywords like '%{$id}%' OR tb_film.actor like '%{$id}%' OR tb_film.director like '%{$id}%'";
} else {
if ($mode == 'danh-sach') {
$id = $geturl[2];
if ($id == 'phim-moi') {
$name = 'Nuevas Películas';
$url_page = Url::get(0, $name, 'Danh sách');
$sql = "id != '0'";
$site_title = "Nuevas Películas y 2014, lista nueva géneros cinematográficos";
$site_description = "Lista de Cine Última actualización continua, consulte delicia y un número ilimitado de películas.";
$site_keywords = "Nuevas películas , una nueva película o, seleccionada nuevas películas";
} else {
if ($id == 'phim-de-cu') {
$name = 'Peliculas Nominadas';
$url_page = Url::get(0, $name, 'Danh sách');
$sql = "decu = '1'";
$site_title = "Película con alta calidad";
$site_description = "Las películas nominadas para el más caliente o 2014, se seleccionaron y evaluaron la más alta calidad.";
$site_keywords = "películas calientes, mejores películas, películas o 2014";
} else {
if ($id == 'phim-le') {
$filmlb = $id;
$name = 'Movie';
$url_page = Url::get(0, $name, 'Danh sách');
$sql = "filmlb = '0'";
$site_title = "Película con alta calidad";
//.........这里部分代码省略.........
示例3: Edituser
public static function Edituser($fullname, $facebookid, $captcha)
{
$fullname = RemoveHack($fullname);
$facebookid = RemoveHack($facebookid);
$captcha = RemoveHack($captcha);
if ($captcha !== $_SESSION["security_code"]) {
$arr = 'captcha';
} else {
$userid = $_SESSION["RK_Userid"];
MySql::dbupdate('user', "fullname = '{$fullname}', facebookid = '{$facebookid}'", "id = '{$userid}'");
$arr = 'done';
}
return $arr;
}