public static function doDeleteAll($tableName, PropelPDO $con, $databaseName = null)
    {
        try {
            $db = Propel::getDB($databaseName);
            if ($db->useQuoteIdentifier()) {
                $tableName = $db->quoteIdentifierTable($tableName);
            }
            $sql = "DELETE FROM " . $tableName;
            $stmt = $con->prepare($sql);
            $stmt->execute();

            return $stmt->rowCount();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute DELETE ALL statement [%s]', $sql), $e);
        }
    }
public static function doDeleteAll($tableName, PropelPDO $con, $databaseName = null)
    {
        try {
            $db = Propel::getDB($databaseName);
            if ($db->useQuoteIdentifier()) {
                $tableName = $db->quoteIdentifierTable($tableName);
            }
            $sql = "DELETE FROM " . $tableName;
            $stmt = $con->prepare($sql);
            $stmt->execute();

            return $stmt->rowCount();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute DELETE ALL statement [%s]', $sql), $e);
        }
    }
public static function doDeleteAll ( $ tableName , PropelPDO $ con , $ databaseName = null ) { try { $ db = Propel :: getDB ( $ databaseName ) ; if ( $ db -> useQuoteIdentifier ( ) ) { $ tableName = $ db -> quoteIdentifierTable ( $ tableName ) ; } $ sql = "DELETE FROM " . $ tableName ; $ stmt = $ con -> prepare ( $ sql ) ; $ stmt -> execute ( ) ; return $ stmt -> rowCount ( ) ; } catch ( Exception $ e ) { Propel :: log ( $ e -> getMessage ( ) , Propel :: LOG_ERR ) ; throw new PropelException ( sprintf ( 'Unable to execute DELETE ALL statement [%s]' , $ sql ) , $ e ) ; } }
Method to deletes all contents of specified table.

This method is invoked from generated Peer classes like this:
<code>
public static function doDeleteAll($con = null)
{
if ($con === null) $con = Propel::getConnection(self::DATABASE_NAME);
BasePeer::doDeleteAll(self::TABLE_NAME, $con, self::DATABASE_NAME);
}
</code>

@param string    $tableName    The name of the table to empty.
@param PropelPDO $con          A PropelPDO connection object.
@param string    $databaseName the name of the database.

@return int The number of rows affected by the statement.  Note
that the return value does require that this information
is returned (supported) by the Propel db driver.
@throws PropelException - wrapping SQLException caught from statement execution.
Method to deletes all contents of specified table .