in reply to Parse PHP or Perl and Reconstruct MySQL Schema
A simpler approach would be to scan the code for strings that look like SQL. You could go with the low-tech approach of scanning for strings that begin with select, insert, update, and delete, or use SQL::ReservedWords::MySQL to build a more accurate regex. Then, if you're feeling really ambitious, send the strings through SQL::Statement to pull out the tables and columns.
-sam
|
|---|