當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MySql::dbupdate方法代碼示例

本文整理匯總了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);
開發者ID:jassonlazo,項目名稱:GamersInvasion-Peliculas,代碼行數:31,代碼來源:member.php

示例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";
//.........這裏部分代碼省略.........
開發者ID:jassonlazo,項目名稱:GamersInvasion-Peliculas,代碼行數:101,代碼來源:site_controller.php

示例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;
 }
開發者ID:jassonlazo,項目名稱:GamersInvasion-Peliculas,代碼行數:14,代碼來源:loginauth.php


注:本文中的MySql::dbupdate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。