Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to drop the table using module?

Answer Posted / Lavesh Agarwal

To drop a table using a Drupal 7 module, you can create an .install file for your custom module and use the schema API to drop the table. Here's an example:n1. Create or edit the .install file.n2. Define a hook_schema() implementation in the file.n3. In the hook_schema(), define the table info array and set the 'sequence' key to TRUE for each field to ensure that the table is dropped before any data in it is deleted.n4. Use db_drop_table() function to drop the table.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Did you contributed the drupal site (any module)?

101


How to create custom table using drupal module?

123


What is the drupal current version?

147


How will you create a field using code?

118