We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Truncate table support

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



93.7k
Accepted
answer

Yes, its perfectly fine.

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