Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Database Tables Gone?
minnieadkins
post Apr 19 2006, 07:31 PM
Post #1


Premium Member
Group Icon

Group: Members
Posts: 292
Joined: 15-December 04
Member No.: 1,768



I wrote a simple web program/site in php that uses mysql as its database. The program stores a daily record of calories/serving. It's basically a calorie chart. I looked today and 2 of my tables were missing. Now considering it only uses 2 tables (which isn't too efficient but it's for personal use) that's a lot missing. It's not a big deal to lose the data and I didn't have a backup, but I'm just curious as to why and how it happened.

Everything worked fine for awhile, then I decided to dabble with cronjobs. I wrote a cron to make sure that the day has been recorded into the database, that way it can still go back and be edited (and keeps the current dietday # intact).

Now I am a complete 'newbie' to crons, but I'm pretty sure it's written correctly. Perhaps I messed up somehow and did the cron incorrect. I tested it however, and it seemed to work.

The problem is that I do not have any 'DROP' sql syntax in my scripts. I'm just curious as to how this could happen? Any ideas, comments/solutions and or laughing at my stupidity is greatly appreciated.
Go to the top of the page
 
+Quote Post
Chesso
post Apr 20 2006, 02:41 AM
Post #2


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833



Well short of someone going in there and removing it or somehow using a php script to do so I really don't know why that would happen.....

I regularly export my databases and just copy/paste into a text file near my site/forum backup files incase I ever need it. Maybe this is a good idea? it's saved me a few times.

Then I just copyed from the text file and pasted into phpmyadmin and fix it all backup.

I do the same thing when testing all my phpbb2 software+mods, I upload the entire forum or changed sections and then export database data for phpbb2 and import in phpmyadmin on host.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL Database(3)
  2. IPS Driver Error / MySQL Database(1)
  3. Astahost Instable..(7)
  4. Can I Access MySQL Database From Outsite, Directly(10)


 



- Lo-Fi Version Time is now: 8th October 2008 - 05:34 AM