break;
}
- if (strpos('table.insert table.update table.replace',Db::p('action'))) {
+ if (empty($Db)) {
+ echo "!Database is missing, use db= or try help\n";
+ break;
+ }
+
+ if (strpos('table.insert table.update table.replace',$v)) {
$_POST = Db::p();
}
- if (empty($Db)) {
- echo "!Database is missing, use db= or try help\n";
+ if ($v == 'begin_transaction') {
+ $Db->query('BEGIN TRANSACTION');
+ break;
+ }
+
+ if ($v == 'commit') {
+ $Db->query('COMMIT');
break;
}
$Db->action($Db->p('action'),$Table);
+ #if ($v) $Db->action($v,$Table);
break;
case 'db':
$this->out($e);
return true;
+ } elseif ($action == 'table.truncate') {
+ $this->db()->query('TRUNCATE '.$this->sql_name());
+ return true;
+
} elseif (self::class_action_out($this,$action) !== null) {
return true;