xwishmasterx Posted May 29, 2012 Share Posted May 29, 2012 Hello I am trying to locate a file inside a huge script, that inserts some rows in the database. I know where in the database these rows are inserted. Is there any way to determine what file the "insert into" came from? Link to comment https://forums.phpfreaks.com/topic/263340-can-you-track-what-file-a-database-insert-came-from/ Share on other sites More sharing options...
.josh Posted May 29, 2012 Share Posted May 29, 2012 what kind of system/server is your script on? If it's on *nix and you have command line access, you can do grep -r "insert into" basedirofscriptshere and it will return files and lines that "insert into" appears, will help you narrow it down. Link to comment https://forums.phpfreaks.com/topic/263340-can-you-track-what-file-a-database-insert-came-from/#findComment-1349593 Share on other sites More sharing options...
.josh Posted May 29, 2012 Share Posted May 29, 2012 and if it's on windows, just navigate to your base dir in the normal windows file explorer and search for "insert before" and it will list files that contain it. Link to comment https://forums.phpfreaks.com/topic/263340-can-you-track-what-file-a-database-insert-came-from/#findComment-1349594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.