@@ 144-148 (lines=5) @@ | ||
141 | } |
|
142 | ||
143 | // Update DB |
|
144 | if (false != $force) { |
|
145 | $result = $this->_db->queryF($sql); |
|
146 | } else { |
|
147 | $result = $this->_db->query($sql); |
|
148 | } |
|
149 | ||
150 | if (!$result) { |
|
151 | $obj->setErrors('The query returned an error. ' . $this->db->error()); |
|
@@ 221-225 (lines=5) @@ | ||
218 | ||
219 | $sql = $this->_deleteQuery($obj); |
|
220 | ||
221 | if (false != $force) { |
|
222 | $result = $this->_db->queryF($sql); |
|
223 | } else { |
|
224 | $result = $this->_db->query($sql); |
|
225 | } |
|
226 | if (!$result) { |
|
227 | return false; |
|
228 | } |
@@ 298-302 (lines=5) @@ | ||
295 | ||
296 | $sql = sprintf('DELETE FROM %s WHERE categoryid = %u ', $this->db->prefix('smartpartner_categories'), $category->getVar('categoryid')); |
|
297 | ||
298 | if (false != $force) { |
|
299 | $result = $this->db->queryF($sql); |
|
300 | } else { |
|
301 | $result = $this->db->query($sql); |
|
302 | } |
|
303 | ||
304 | if (!$result) { |
|
305 | return false; |
@@ 302-306 (lines=5) @@ | ||
299 | $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
300 | } |
|
301 | $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
302 | if (false != $force) { |
|
303 | $result = $this->db->queryF($sql); |
|
304 | } else { |
|
305 | $result = $this->db->query($sql); |
|
306 | } |
|
307 | if (!$result) { |
|
308 | return false; |
|
309 | } |
|
@@ 388-392 (lines=5) @@ | ||
385 | } |
|
386 | $sql .= ' WHERE ' . $whereclause; |
|
387 | } |
|
388 | if (false != $force) { |
|
389 | $result = $this->db->queryF($sql); |
|
390 | } else { |
|
391 | $result = $this->db->query($sql); |
|
392 | } |
|
393 | if (!$result) { |
|
394 | return false; |
|
395 | } |
|
@@ 427-431 (lines=5) @@ | ||
424 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
|
425 | $sql .= ' ' . $criteria->renderWhere(); |
|
426 | } |
|
427 | if (false != $force) { |
|
428 | $result = $this->db->queryF($sql); |
|
429 | } else { |
|
430 | $result = $this->db->query($sql); |
|
431 | } |
|
432 | if (!$result) { |
|
433 | return false; |
|
434 | } |
@@ 490-494 (lines=5) @@ | ||
487 | ||
488 | //echo "<br>$sql<br>"; |
|
489 | ||
490 | if (false != $force) { |
|
491 | $result = $this->db->queryF($sql); |
|
492 | } else { |
|
493 | $result = $this->db->query($sql); |
|
494 | } |
|
495 | ||
496 | if (!$result) { |
|
497 | $fileObj->setErrors('The query returned an error. ' . $this->db->error()); |
|
@@ 530-534 (lines=5) @@ | ||
527 | // Delete the record in the table |
|
528 | $sql = sprintf('DELETE FROM %s WHERE fileid = %u', $this->db->prefix('smartpartner_files'), $file->getVar('fileid')); |
|
529 | ||
530 | if (false != $force) { |
|
531 | $result = $this->db->queryF($sql); |
|
532 | } else { |
|
533 | $result = $this->db->query($sql); |
|
534 | } |
|
535 | if (!$result) { |
|
536 | return false; |
|
537 | } |
@@ 880-884 (lines=5) @@ | ||
877 | ||
878 | //echo "<br>" . $sql . "<br>";exit; |
|
879 | ||
880 | if (false != $force) { |
|
881 | $result = $this->db->queryF($sql); |
|
882 | } else { |
|
883 | $result = $this->db->query($sql); |
|
884 | } |
|
885 | ||
886 | if (!$result) { |
|
887 | return false; |
|
@@ 940-944 (lines=5) @@ | ||
937 | ||
938 | $sql = sprintf('DELETE FROM %s WHERE id = %u', $this->table, $partner->getVar('id')); |
|
939 | ||
940 | if (false != $force) { |
|
941 | $result = $this->db->queryF($sql); |
|
942 | } else { |
|
943 | $result = $this->db->query($sql); |
|
944 | } |
|
945 | if (!$result) { |
|
946 | return false; |
|
947 | } |