name_uninstall_tables()


This function runs the SQL commands to delete any tables or values that were added during the installation of the add-on. The return string should return TRUE to indicate the add-on's tables were removed properly.


An example of a valid function:

<?php

function name_uninstall_tables(){

       global $conn, $config;

       require_once($config['basepath'] . '/include/misc.inc.php');

    $misc = new Misc();

    $sql_uninstall[] = "DELETE FROM  " . $config['table_prefix_no_lang'] . "addons

                        WHERE addons_name ='framework'";

       foreach($sql_uninstall as $elementContents) {

        $recordSet = $conn->Execute($elementContents);

               if ($recordSet === false) {

                       echo "<strong><span style=\"red\">ERROR - $elementContents</span></strong><br/>";

                       return FALSE;

               }

               else {

                       return TRUE;

               }

       }

}

?>