コード例 #1
0
ファイル: LDao.php プロジェクト: biribogos/wikihow-src
 public static function updateTitleGrpInfo($seedKeyword, $shortTitle, $grpId, $aid, $whTitle = '')
 {
     if (empty($seedKeyword) || empty($shortTitle)) {
         return null;
     }
     $dbw = DbUtils::getDbw();
     $query = "UPDATE leonard.leo_titles t \n\t\t SET \n\t\t\tdup_grp_id = " . $dbw->addQuotes($grpId) . "  \n";
     if (!empty($aid) && $aid > 0) {
         $query .= ", wh_title = " . $dbw->addQuotes(str_replace(' ', '-', $whTitle)) . " \n" . ", wh_aid = " . $dbw->addQuotes($aid) . " \n";
     }
     $query .= " WHERE  " . "    t.seed = " . $dbw->addQuotes($seedKeyword) . " \n" . "    AND t.short_title = " . $dbw->addQuotes($shortTitle) . " \n\t\t     AND t.status = 'A' ";
     return DbUtils::exDbW($query);
 }