當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。