SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Clear Data

  1. #1
    Non-Member
    Join Date
    Aug 2007
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Clear Data

    Hi,

    How do I empty all data inside a database?, without deleting the database completely

    TicTac

  2. #2
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in phpMyAdmin ther is an empty option which resets the table but keeps the structure
    or from php you can:
    PHP Code:
    $sql "TRUNCATE TABLE `table_name`";

    mysql_query($sql); 

  3. #3
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have to do it one table at a time. you also don't need phpmyadmin to do it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •