SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: MySQL Table Randomly Emptied
-
Jun 6, 2007, 09:41 #1
- 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
-
Jun 6, 2007, 09:56 #2
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is the table of type HEAP?
-
Jun 6, 2007, 10:00 #3
- 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
-
Jun 7, 2007, 03:29 #4
- 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.
-
Jun 7, 2007, 03:35 #5
- 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
-
Jun 7, 2007, 10:48 #6
Bookmarks