Napisałem tranzakcje na proces kasowania danych z tabel:
<?php if($this->stan !== false) { db::query('START TRANSACTION'); { if(!db::query('TRUNCATE TABLE '.$wpis)) { db::query('ROLLBACK'); $a = true; } } $this->stan = false; if($a) return false; else db::query('COMMIT'); } ?>
I za każdym razem gdy chce uruchomić skrypt to wywala mi błąd:
Can't execute the given command because you have active locked tables or an active transaction
W manualu znalazłem takie coś odnośnie transakcji i truncate table:
http://dev.mysql.com/doc/refman/4.1/en/implicit-commit.html
Pozdrawiam