当前位置: 首页>>代码示例>>PHP>>正文


PHP Db::affectedRows方法代码示例

本文整理汇总了PHP中Db::affectedRows方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::affectedRows方法的具体用法?PHP Db::affectedRows怎么用?PHP Db::affectedRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db的用法示例。


在下文中一共展示了Db::affectedRows方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addjobs

 public function addjobs()
 {
     if (is_numeric($this->id)) {
         $db = new Db();
         if (Session::read("userid")) {
             $user_id = Session::read("userid");
             $id = $db->quote($this->id);
             $heading = $db->quote($this->heading);
             $post = $db->quote($this->post);
             $education = $db->quote($this->education);
             $exp_min = $db->quote($this->exper_min);
             $exp_max = $db->quote($this->exper_max);
             $salary = $db->quote($this->salary);
             $description = $db->quote($this->description);
             $company_name = $db->quote($this->company_name);
             $website = $db->quote($this->website);
             $email = $db->quote($this->email);
             $phone = $db->quote($this->phone);
             $city = $db->quote($this->city);
             $address = $db->quote($this->address);
             $query = "INSERT INTO " . $this->tableName() . " (id,user_id, heading, post, education, exp_min, exp_max,\n                salary, description, company_name, company_url, phone, city, address, active)\n                VALUES({$id} ,{$user_id},{$heading},{$post},{$education},{$exp_min},{$exp_max},{$salary},{$description},{$company_name},{$website},{$email},\n                   {$phone},{$city},{$address},1)";
             if ($db->query($query)) {
                 if ($db->affectedRows()) {
                     return true;
                 }
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:30,代码来源:class.Jobs.php

示例2: addcompany

 public function addcompany()
 {
     $errors = Error::get("error");
     if (!count($errors) || $errors == "") {
         $db = new Db();
         if (Session::read("userid")) {
             $user_id = Session::read("userid");
             //print_r($user_id);                exit();
             // $user_id=$db->quote($this->user_id);
             $name = $db->quote($this->name);
             $email = $db->quote($this->email);
             $website = $db->quote($this->website);
             $phone = $db->quote($this->phone);
             $city = $db->quote($this->city);
             $location = $db->quote($this->location);
             $specialization = $db->quote($this->specialization);
             $description = $db->quote($this->description);
             $query = "INSERT INTO " . $this->tableName() . " (user_id,name,city,location,website,email,phone,specialization,description,active) \n                VALUES({$user_id},{$name},{$city},{$location},{$website},{$email},{$phone},{$specialization},{$description},1)";
             if ($db->query($query)) {
                 //print_r($query);                exit();
                 if ($db->affectedRows()) {
                     return true;
                 }
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:28,代码来源:class.Company.php

示例3: save

 public function save()
 {
     if (is_numeric($this->id) && is_string($this->name)) {
         $db = new Db();
         $id = $db->quote($this->id);
         $user_id = $db->quote($this->user_id);
         $doc_type_id = $db->quote($this->doc_type_id);
         $heading = $db->quote($this->heading);
         $description = $db->quote($this->desc);
         $category_id = $db->quote($this->category_id);
         $cost = $db->quote($this->cost);
         $case = $db->quote($this->case_no);
         $judge = $db->quote($this->judges);
         $act = $db->quote($this->act);
         $file = $db->quote($this->file);
         $active = $db->quote($this->active);
         $query = "INSERT INTO " . $this->tableName() . " (user_id,type_id,heading,desc,category_id,cost,case_no,judges,act,file,active) \n                VALUES({$doc_type_id},{$heading},{$description},{$category_id},{$cost},{$case},{$judge},{$act},{$file}, {$active}) \n                ON DUPLICATE KEY UPDATE    \n               user_id={$user_id},type_id={$doc_type_id},heading={$heading},desc={$description},category_id={$category_id},cost={$cost},\n                   case_no={$cost},judges={$judge},act={$act},file={$file},active={$active}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:25,代码来源:class.Document.php

示例4: addquestion

 function addquestion()
 {
     $db = new Db();
     $question = $db->quote($this->question);
     $heading = $db->quote($this->heading);
     $topic = $db->quote($this->topic_id);
     $city = $db->quote($this->city);
     $query = "INSERT INTO " . $this->tableName() . " (question, heading,topic_id, city, active) \n                VALUES({$question},{$heading},{$topic},{$city},1)";
     if ($db->query($query)) {
         //print_r($query);                exit();
         if ($db->affectedRows()) {
             return true;
         }
     }
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:15,代码来源:class.Questions.php

示例5: save

 public function save()
 {
     if (is_numeric($this->id)) {
         $db = new Db();
         $id = $db->quote($this->id);
         $active = $db->quote($this->active);
         $query = "INSERT INTO " . $this->tableName() . " (id, active)VALUES({$id} , {$active}) \n                ON DUPLICATE KEY UPDATE    \n                active={$active}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:15,代码来源:class.Resume.php

示例6: save

 public function save()
 {
     if (is_numeric($this->country_id) && is_string($this->country_name)) {
         $db = new Db();
         $id = $db->quote($this->country_id);
         $name = $db->quote($this->country_name);
         $active = $db->quote($this->country_status);
         $query = "INSERT INTO " . $this->tableName() . " (id, name, active) VALUES({$id},{$name} , {$active}) \n                ON DUPLICATE KEY UPDATE    \n                name= {$name}, active={$active}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:legal-lawyer1,代码行数:16,代码来源:class.Country.php

示例7: save

 public function save()
 {
     //        if(is_numeric($this->id) && is_string($this->name)){
     $db = new Db();
     //            $id = $db->quote($this->id);
     $name = $db->quote($this->name);
     $url = $db->quote($this->url);
     $active = $db->quote($this->pagecategory_status);
     $query = "INSERT INTO " . $this->table() . " (name,url, active) VALUES({$name},{$url} , {$active}) \n                ON DUPLICATE KEY UPDATE    \n                name= {$name}, active={$active}";
     if ($db->query($query)) {
         if ($db->affectedRows()) {
             return true;
         }
     }
     //        }
     return false;
 }
开发者ID:sonaljain888,项目名称:legal-lawyer,代码行数:17,代码来源:class.pagecategory.php

示例8: save

 public function save()
 {
     if (is_numeric($this->id) && is_string($this->legal_service)) {
         $db = new Db();
         $id = $db->quote($this->id);
         $legal_service = $db->quote($this->legal_service);
         $description = $db->quote($this->description);
         $cost = $db->quote($this->cost);
         $time = $db->quote($this->time);
         $active = $db->quote($this->active);
         $query = "INSERT INTO " . $this->tableName() . " (id,legal_service,description,cost,time, active) VALUES({$id},{$legal_service},{$description},{$cost},{$time} , {$active}) \n                ON DUPLICATE KEY UPDATE    \n               legal_service= {$legal_service},description={$description},cost={$cost},time={$time} active={$active}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:19,代码来源:class.LegalService.php

示例9: save

 public function save()
 {
     if (is_numeric($this->id) && is_string($this->name)) {
         $db = new Db();
         $id = $db->quote($this->id);
         $user_id = $db->quote($this->user_id);
         $city_name = $db->quote($this->city_name);
         $locality = $db->quote($this->locality);
         $builder = $db->quote($this->builder_name);
         $project = $db->quote($this->project_name);
         $clear = $db->quote($this->clear_title);
         $legal_risk = $db->quote($this->legal_risk);
         $legal_description = $db->quote($this->legal_description);
         $active = $db->quote($this->active);
         $query = "INSERT INTO " . $this->tableName() . " (user_id,city_name,locality,builder_name,project_name,clear_title,legal_risk,legal_description,active) \n                VALUES({$user_id},{$city_name},{$locality},{$builder},{$project},{$clear},{$legal_risk},{$legal_description}, {$active})";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:23,代码来源:class.Property.php

示例10: save

 public function save()
 {
     if (is_numeric($this->menu_id) && is_string($this->menu_name)) {
         $db = new Db();
         $id = $db->quote($this->menu_id);
         $name = $db->quote($this->menu_name);
         $category_id = $db->quote($this->category_id);
         $parent_id = $db->quote($this->parent_id);
         $url = $db->quote($this->url);
         $image = $db->quote($this->image);
         $access_type = $db->quote($this->access_type);
         $menu_order = $db->quote($this->menu_order);
         $active = $db->quote($this->menu_status);
         $query = "INSERT INTO " . $this->tableName() . " (id, name, category_id, parent_id, image, url, active, access_type, menu_order) \n                VALUES({$id}, {$name}, {$category_id}, {$parent_id},{$image}, {$url}, {$active}, {$access_type}, {$menu_order})\n                ON DUPLICATE KEY UPDATE    \n                name= {$name}, category_id={$category_id}, parent_id={$parent_id},image={$image}, url={$url}, access_type={$access_type}, menu_order={$menu_order}, active={$active}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:22,代码来源:class.Menu.php

示例11: save

 public function save()
 {
     if (is_numeric($this->page_id) && is_string($this->page_name)) {
         $db = new Db();
         $id = $db->quote($this->page_id);
         $category_id = $db->quote($this->category_id);
         $name = $db->quote($this->page_name);
         $url = $db->quote($this->url);
         $top_description = $db->quote($this->top_description);
         $bottem_description = $db->quote($this->bottom_description);
         $keyword = $db->quote($this->keyword);
         $title = $db->quote($this->title);
         $description = $db->quote($this->description);
         $access_type = $db->quote($this->access_type);
         $active = $db->quote($this->page_status);
         $author = $db->quote(1);
         $modified = $db->quote(1);
         $query = "INSERT INTO " . $this->tableName() . " (page_id, category_id, name, url, top_description, bottem_description, \n                Keyword, title, description, author, modified_by, access_type,  active) \n                VALUES({$id}, {$category_id},  {$name}, {$url}, {$top_description}, {$bottem_description}, {$keyword}, {$title}, {$description},\n                    {$author}, {$modified}, {$access_type}, {$active})\n                ON DUPLICATE KEY UPDATE    \n                name= {$name}, category_id={$category_id}, url={$url},top_description={$top_description}, bottem_description={$bottem_description}, \n                Keyword={$keyword}, title={$title}, description={$description}, author={$author}, modified_by={$modified}, \n                   active={$active}, access_type={$access_type}";
         if ($db->query($query)) {
             if ($db->affectedRows()) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:sonaljain888,项目名称:legal-lawyer,代码行数:26,代码来源:class.Page.php

示例12: editProfile

 function editProfile($user_id)
 {
     $errors = Error::get("error");
     if (!count($errors) || $errors == "") {
         $db = new Db();
         if (Session::read("userid")) {
             $user_id = Session::read("userid");
             //$user_id= $db->quote($this->user_id);
             $name = $db->quote($this->name);
             $website = $db->quote($this->website);
             //$mobile = $db->quote($this->mobile);
             $add = $db->quote($this->add);
             $city = $db->quote($this->city);
             $location = $db->quote($this->location);
             $education = $db->quote($this->education);
             $experience = $db->quote($this->experince);
             $specialization = $db->quote($this->specialization);
             $pra_court = $db->quote($this->practicing_court);
             $query = "update user  set Name={$name}, Website={$website}, Address={$add},\n                City={$city}, Location={$location}, Education={$education}, Experiance={$experience}, Specialization={$specialization},\n                    PracticingCourt={$pra_court}  where UserId={$user_id}";
             if ($db->query($query)) {
                 if ($db->affectedRows()) {
                     return true;
                 }
             }
         }
     }
 }
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:27,代码来源:class.User.php


注:本文中的Db::affectedRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。