Huge DATABASE problem, Please HELP!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zamees
Forum Newbie
Posts: 19
Joined: Mon Oct 06, 2003 11:27 am

Huge DATABASE problem, Please HELP!

Post by Zamees »

Every so often, I am losing ENTIRE records from the database. I have one admin page set up, and it is logged. Besides that page, there is no where else on the site that has a DELETE function. All records are stored with a primary id#, and this number is NEVER accessed again. Only used in creation. The rest of the functions are done with UPDATE statements, which in no way can cause a delete. Only 2 users have access to the main database, and neither of us have deleted it.

Please anyone with any info on how this could happen let me know.
jasonjohns
Forum Newbie
Posts: 3
Joined: Fri Nov 07, 2003 9:30 am
Location: Oklahoma City, OK

Post by jasonjohns »

what db are you using?

Are you using GET variables in your SQL queries? And if so are you scrubbing the data before allowing it in?

Is the delete query in the admin page working correctly?
Zamees
Forum Newbie
Posts: 19
Joined: Mon Oct 06, 2003 11:27 am

Post by Zamees »

Hey, thanx for the quick response, Im using MYSQL on localhost. Not using any GET's. The DELETE query works perfectly in the admin page, and hasn't been touched today, but the record went missing today.

Is this a coding error, or a database error?
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

i am guessing u have a login system in place, every one needs to login before they can delete anything?

why dont you send a email to your self every time a record is deleted, in the email just send the username etc, use this for few days and you will know about it, u can also use this method to record this info into a db table along with time of action, ip etc :).
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Could you have a rollback situation, whereby new data is being replaced by old and therefore records go missing? Or could someone be logging into the database either via the command line or using a GUI like phpMyAdmin to make changes?

Mac
Post Reply