Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Truncate table support

Hi, I need to clear table (10000+ records). Is it possible to use TRUNCATE TABLE query from Phalcon?



84.1k
Accepted
answer

Yes, its perfectly fine.

$sql = 'TRUNCATE TABLE `robots`';
$success = $connection->execute($sql);