I am editing my website to make it more updated and have created a new couple of pages which use my Database. I created the script and the databases (and tables) and everything was working OK... until somehow the tables have got partially deleted. I say partially because if I go in to PHPMyAdmin they are still listed on the left hand side column of the page but I am unable to click them and they do not show up in the main content block of the page when I click on the database name.

I have had a talk with the web-hosters but they are not sure what to do so I'm hoping someone here will be able to help me out.

An example of what I mean is in the image when I have attempted to import a file which I created after re-creating the database before it failed around an hour ago for a second time...


Any help ASAP is very much appreciated, especially because it is a security risk if it does it and I'm not aware of the problem.

Recommended Answers

All 5 Replies

I'm familiar with MS SQL, not MySql, but I'm still going to offer a suggestion. In MS Sql you have a separate file for the database, but the DBMS maintains information about the table in a system level database. It's possible the system table has gotten corrupted. That may mean your actual database table (file) is still intact. If you can determine where the database file is stored then you should copy it (simple explorer file copy) to another location for safekeeping. Then you can try to delete whatever remnants are left from within MySql. After that you can copy the backup file back to its original location then do an attach. Again, I know how to do this in MS Sql but not in MySql. I think the MS Sql command is sp_attach_db or something similar. You can see if there is a similar command in MySql.


It sounds like there is something in your php code that is deleting the table out of the database. Do you have a backup of the tables fromm before you started accessing them with php?

If you created the table initially by using php and your running the same script again that that would cause what you are seeing. I suggest that you drop the table completely using phpmyadmin and then run the code that created the table correctly the first time. Export the data using phpmyadmin to a CSV file or use the backup database options.
Then run your php web pages and see if it corrupts them again. If so post your php code and we will seee what we can figure out for you.

And meaning no disrespect Rev. Jim but MySQL is not MS SQL Server and the data structure and ability to read/write files are quite different. Although your suggestion is logical it is not really going to be much help, especially if he is on a shared linux host instead of a windows system.

Hello !
I'm just new in Php and mysql. I have a assignment to create a web site that allow customer to book the hotel room online. I don't know how to start it. I I want to know what should I do at the first step to make it, and briefly detial the process of it too.
Please help me everyone!

The first step is to start a new thread with your question instead of hijacking this one. You'll increase your chances of getting an answer with a title relating to your question.

The second step is to provide evidence of actually having done some work yourself. We won't do your homework for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.