aboutsummaryrefslogtreecommitdiffstats
path: root/MainController.php
diff options
context:
space:
mode:
Diffstat (limited to 'MainController.php')
-rw-r--r--MainController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/MainController.php b/MainController.php
index c4d937d..81c68bf 100644
--- a/MainController.php
+++ b/MainController.php
@@ -53,6 +53,7 @@ class MainController
}
$this->find($where);
+
if (!is_array($this->data)) {
return false; // found nothing
}
@@ -256,14 +257,14 @@ class MainController
$insert = rtrim($insert, ', ');
$val = implode(', ', array_keys($values));
$sql = "INSERT INTO `{$this->table}` ({$insert}) VALUES ({$val})";
-
+
return MainDb::query($sql, $values);
}
////
// delete This Thing
- protected function delete($where, $limit = '')
+ public function delete($where, $limit = '')
{
if (empty($where)) {
return MainApp::error('Cannot delete without arguments');