Beispiel #1
0
 public function incrementCrawler($cid)
 {
     $o_db = new DBAdapter2(array('host' => $this->dbConf->crawler->host, 'username' => $this->dbConf->crawler->username, 'password' => $this->dbConf->crawler->password, 'schema' => $this->dbConf->crawler->schema));
     $sql = "UPDATE " . $this->dbConf->crawler->schema . ".crawler SET cr_counter = cr_counter+1 WHERE cr_id = " . $cid;
     $affectedRows = 0;
     try {
         $o_db->executeNoResSQL($sql, $affectedRows);
         unset($o_db);
         return TRUE;
     } catch (DBAdapter2Exception $e) {
         print "\n" . date("y/m/d : H:i:s", time()) . " File:CRunner.php. Line:" . __LINE__ . ". AUTO : SQL ERROR: " . $sql . " *** " . $e->getMessage();
         unset($o_db);
         return FALSE;
     }
 }