Doctrine ORM does not provide a built in method to truncate a table, so we must run a sql query manually. Use the below code and alter the SQL as needed:
$doctrine = Doctrine_Manager::getInstance()->getCurrentConnection()->getDbh(); $doctrine->query('TRUNCATE TABLE tableName'); unset($doctrine);
Continue Reading
Hi I'm Nick Bartlett and thanks for visiting my blog. I'm not much of a writer; many of my posts are short and to the point while others are meant to be a reference for myself and other web developers.