SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    466
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Table Randomly Emptied

    Are there good reasons why one particular MySQL table would just randomly turn up empty? On the code I'm working now, I have 6 different tables. The other 5 seam to work fine, so I'm going to rule out the problem being server related. I'm going to go ahead and say it's something in my code.

    I do have a user admin area where a human must log in to gain access (I'm using vBulletin's external member management) . In this admin, a single user can only delete their own MySQL rows (data which they have entered). For the past few days, I've noticed that this database has turned up empty even though I have a few different users.

    In other words, if I (or anyone else) wanted to empty out the database table, they SHOULD (if my script works correctly) have to login with each username and password in order to delete the given rows. I'm going to say this is highly unlikely because the site isn't even launched yet and how would a person crack multiple passwords?

    I considered the notion that maybe spiders are following the links and deleting these rows, but my member management should block them from getting into the admin at all.

    So, are there any likely possibilities that may have snuck through my code that would be completely clearing out my MySQL data in a single table?

    Any good way to test this?

    Thanks,
    Brandon
    Home Recording Forum -
    Make 60% Commission Pushing my new mega system
    Killer Home Recording

  2. #2
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the table of type HEAP?

  3. #3
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    466
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great question. I have no idea. How would I go about finding that out?

    Brandon
    Home Recording Forum -
    Make 60% Commission Pushing my new mega system
    Killer Home Recording

  4. #4
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access to a commandline client, type in: show create table <tablename>;
    From phpmyadmin, you can see it somewhere. It's been a while since I used that, so I don't recall exactly where, but it says either HEAP, MyISAM or InnoDB.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Whistler, Canada
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you properly secure your script against SQL injections?

    Cheers,
    Pepe

  6. #6
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    If you have access to a commandline client, type in: show create table <tablename>;
    From phpmyadmin, you can see it somewhere. It's been a while since I used that, so I don't recall exactly where, but it says either HEAP, MyISAM or InnoDB.
    "HEAP" may instead be listed as "MEMORY" depending on your version of MySQL (just FYI).
    PHP questions? RTFM
    MySQL questions? RTFM


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
  •