class/AnswerHandler.php 1 location
|
@@ 352-365 (lines=14) @@
|
| 349 |
|
* @param bool $force |
| 350 |
|
* @return bool |
| 351 |
|
*/ |
| 352 |
|
public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false) |
| 353 |
|
{ |
| 354 |
|
$set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
| 355 |
|
$sql = 'UPDATE ' . $this->db->prefix('smartfaq_answers') . ' SET ' . $set_clause; |
| 356 |
|
if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
| 357 |
|
$sql .= ' ' . $criteria->renderWhere(); |
| 358 |
|
} |
| 359 |
|
//echo "<br>" . $sql . "<br>"; |
| 360 |
|
if (!$this->db->queryF($sql)) { |
| 361 |
|
return false; |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
return true; |
| 365 |
|
} |
| 366 |
|
|
| 367 |
|
/** |
| 368 |
|
* @param $faqids |
class/CategoryHandler.php 1 location
|
@@ 459-471 (lines=13) @@
|
| 456 |
|
* |
| 457 |
|
* @return bool |
| 458 |
|
**/ |
| 459 |
|
public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null) |
| 460 |
|
{ |
| 461 |
|
$set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
| 462 |
|
$sql = 'UPDATE ' . $this->db->prefix('smartfaq_categories') . ' SET ' . $set_clause; |
| 463 |
|
if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
| 464 |
|
$sql .= ' ' . $criteria->renderWhere(); |
| 465 |
|
} |
| 466 |
|
if (!$this->db->queryF($sql)) { |
| 467 |
|
return false; |
| 468 |
|
} |
| 469 |
|
|
| 470 |
|
return true; |
| 471 |
|
} |
| 472 |
|
|
| 473 |
|
/** |
| 474 |
|
* @param int $cat_id |
class/FaqHandler.php 1 location
|
@@ 854-866 (lines=13) @@
|
| 851 |
|
* |
| 852 |
|
* @return bool |
| 853 |
|
**/ |
| 854 |
|
public function updateAll($fieldname, $fieldvalue, $criteria = null) |
| 855 |
|
{ |
| 856 |
|
$set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
| 857 |
|
$sql = 'UPDATE ' . $this->db->prefix('smartfaq_faq') . ' SET ' . $set_clause; |
| 858 |
|
if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
| 859 |
|
$sql .= ' ' . $criteria->renderWhere(); |
| 860 |
|
} |
| 861 |
|
if (!$this->db->queryF($sql)) { |
| 862 |
|
return false; |
| 863 |
|
} |
| 864 |
|
|
| 865 |
|
return true; |
| 866 |
|
} |
| 867 |
|
|
| 868 |
|
/** |
| 869 |
|
* @param $faqid |