Jump to content

Lost Sql File For Php


dotkpay

Recommended Posts

Hello,

 

I recently lost some data when my pc cashed and I happened to lose the file with database tables for my php program. Now I can't install my program because I dont have the sql statements to structure my db tables.

Any ideas how I can form an sql text file without having to go through the php code file by file, line by line?

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/269233-lost-sql-file-for-php/
Share on other sites

You could start by searching the code for SELECT statements to see what you were pulling from the tables. (Although if you're one who uses "SELECT * " you'll find out one reason why it's a bad idea).

 

Ditto for UPDATE statements and INSERTS.

I've found that actually running your code, assuming there is error checking and error reporting logic to display any sql errors and any php detected errors, is a good way of finding table and column names that are actually referenced by the code. You would still need to determine the actual data type for each column.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.