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


PHP Calendar::getSQLDateTime方法代码示例

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


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

示例1: registerJobSeeker

 public function registerJobSeeker($data)
 {
     $uDao = new UsersDao();
     $user = new stdClass();
     $user->email = $data->email;
     $user->password = md5($data->password);
     $user->firstname = $data->firstname;
     $user->lastname = $data->lastname;
     $user->fb_user_id = $data->fb_user_id;
     $user->birthday = $data->birthday;
     $user->gender = $data->gender;
     $user->location_name = $data->location_name;
     $user->location_id = $data->location_id;
     $user->country = $data->country;
     $user->locale = $data->locale;
     $user->date_created = Calendar::getSQLDateTime();
     $response = new stdClass();
     $response->success = false;
     $response->message = "Failed to register";
     if ($uDao->insert($user)) {
         $response->success = true;
         $response->message = "Registration Complete";
     }
     return $response;
 }
开发者ID:rbartolay,项目名称:Hummer,代码行数:25,代码来源:AuthenticationBom.php

示例2: insertRecords

 public function insertRecords($records)
 {
     $urls = $this->jDao->retrieveURLByAPISourceId(2);
     foreach ($records->jobs as $record) {
         if (in_array($record->url, $urls)) {
             $record->jobtitle = $record->title;
             $record->location = $record->locations;
             $record->date_posted = Calendar::formatStringToSQLDateAndTime($record->date);
             $record->website = $record->site;
             $record->api_source_id = 2;
             $record->snippet = $record->description;
             $record->source = $record->company;
             $condition = array('url' => $record->url);
             unset($record->locations, $record->site, $record->salary, $record->description, $record->title, $record->date, $record->url);
             var_dump($this->jDao->updateRecord($record, $condition));
         } else {
             $record->date_created = Calendar::getSQLDateTime();
             $record->jobtitle = $record->title;
             $record->location = $record->locations;
             $record->date_posted = Calendar::formatStringToSQLDateAndTime($record->date);
             $record->website = $record->site;
             $record->api_source_id = 2;
             $record->snippet = $record->description;
             $record->source = $record->company;
             unset($record->locations, $record->site, $record->salary, $record->description, $record->title, $record->date);
             var_dump($this->jDao->insertRecord($record));
         }
     }
 }
开发者ID:rawntech-rohan,项目名称:Project-CJ,代码行数:29,代码来源:CareerjetBom.php

示例3: insertRecord

 public function insertRecord($record)
 {
     $jobkeys = $this->getAllJobsKey();
     $cBom = new CompaniesBom();
     $companies = $cBom->getAllCompanyNames();
     $this->getConnection()->beginTransaction();
     $company = $cBom->getCompanyIDByCompanyName($record->company);
     if (is_null($company)) {
         $data = new stdClass();
         $data->name = $record->company;
         $cBom->insertRecord($data);
         $record->company_id = $this->getConnection()->getLastInsertID();
     } else {
         $record->company_id = $company->company_id;
     }
     unset($record->company);
     // checks if job key is already existing on our database
     if (in_array($record->jobkey, $jobkeys)) {
         $condition = array('jobkey' => $record->jobkey);
         echo "Update " . $record->jobkey . "<br>";
         unset($record->formattedlocation, $record->date, $record->onmousedown, $record->formattedlocationfull, $record->jobkey, $record->formattedrelativetime);
         var_dump($this->getConnection()->update("jobs", $record, $condition));
     } else {
         $record->date_posted = Calendar::formatStringToSQLDateAndTime($record->date);
         $record->date_created = Calendar::getSQLDateTime();
         echo "Insert " . $record->jobkey . "<br>";
         unset($record->formattedlocation, $record->date, $record->onmousedown, $record->formattedlocationfull, $record->formattedrelativetime);
         var_dump($this->getConnection()->insert("jobs", $record));
     }
     return $this->getConnection()->commitTransaction();
 }
开发者ID:rawntech-rohan,项目名称:Project-CJ,代码行数:31,代码来源:IndeedDao.php

示例4: insertRecords

 public function insertRecords($records)
 {
     $urls = $this->jDao->retrieveURLByAPISourceId(6);
     foreach ($records as $record) {
         $parse = $this->parseDescription($record->description);
         $record->company = $parse->company;
         $record->location = $parse->location;
         $record->jobkey = $parse->ref;
         $record->snippet = $parse->summary;
         $record->date_created = Calendar::getSQLDateTime();
         $record->jobtitle = $record->title;
         $record->url = $record->link;
         $record->country = strtoupper($this->getCountry());
         $record->date_posted = str_replace("&#x3A;", ":", $record->pubdate);
         $record->api_source_id = 6;
         unset($record->title, $record->pubdate, $record->description, $record->guid, $record->link);
         if (in_array($record->url, $urls)) {
             $condition = array('url' => $record->url);
             echo "Update " . $record->jobkey;
             var_dump($this->jDao->updateRecord($record, $condition));
         } else {
             echo "Insert " . $record->jobkey;
             var_dump($this->jDao->insertRecord($record));
         }
     }
 }
开发者ID:rawntech-rohan,项目名称:Project-CJ,代码行数:26,代码来源:MonsterBom.php

示例5: insertRecord

 public function insertRecord($record)
 {
     $record->date_created = Calendar::getSQLDateTime();
     return $this->cDao->insertRecord($record);
 }
开发者ID:rawntech-rohan,项目名称:Project-CJ,代码行数:5,代码来源:CompaniesBom.php


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