dopes242 Posted December 15, 2011 Share Posted December 15, 2011 I have an audit trail that record users ids and a copy of the sql string for any updates they make to my application. This is very easy for me to follow to find exactly where changes happened but do end users it is a bit of a challenge. Has anyone seen or made a script that can either compare two sql strings to see what fields have different values or a script that takes an SQL string and outputs its field names and values to an array that I can use for comparisons? Example being the look at a update made by user X, the database pulls the sql for that change then looks for the previous change up any user before (update sql should have a value for all fields) then compares to see what user X changed. If not im thinking of case statement to divide sql request between inserts and update then writing a script to split the strings based on where the commas were. Any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/253189-sql-string-comparison-sql-sting-variables-to-array/ 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.