dotkpay Posted October 8, 2012 Share Posted October 8, 2012 (edited) 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 Edited October 8, 2012 by dotkpay Quote Link to comment https://forums.phpfreaks.com/topic/269233-lost-sql-file-for-php/ Share on other sites More sharing options...
Barand Posted October 8, 2012 Share Posted October 8, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/269233-lost-sql-file-for-php/#findComment-1383774 Share on other sites More sharing options...
PFMaBiSmAd Posted October 8, 2012 Share Posted October 8, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/269233-lost-sql-file-for-php/#findComment-1383779 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.