Jump to content

Scan PHP script to help generate sql database


Guyzer

Recommended Posts

I had a website I made quite awhile ago, written in PHP and when I backed it up, I didn't export my database to a text file or anything. :-\ Now I'm sure I could pick through each script and be able to re-build my database tables however this will take a while and I could possible miss or misspell information and could be a long task to get the database structure back in order. And of course I didn't document the database structure in my scripts.

 

Now my question, is there a program out there that could scan all the scripts and generate the tables and field names to help me build the new database. I'm sure I could populate the database when I can get the structure.

 

I know this all my fault and if I spend another 30 second and exported the database I would be running my website by now. Any help would great! Thanks for your help!

 

Guyzer

Link to comment
Share on other sites

Not that i'm aware of. Moreover, it might not be possible. For example, if you had a query with a join and didn't explicitly declare which tables the columns in the result set were coming from, you wouldn't know which table to put them in.

 

Also, how would you decide the types, collations, lengths etc of each field type from a bunch of SELECT/INSERT and DELETE queries?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.