Looking to have a script written in Perl or PHP that will query a MySQL database and be able to do a FIND and REPLACE (update) my data. Basically, I need a form that will find dates (currently stored in Unix timestamp format) that I enter, and replace them with new dates. So, I want to have a pull-down menu that looks like the following:
Find: MONTH | DAY | YEAR <== pull-down menus (01/01/2007)
Replace with: MONTH | DAY | YEAR <== pull-down menus (01/01/2007)
--
For example, if I search for Jan 28 2005, and replace it with Jan 28 2007. The script should find all instances of Jan 28, 2005 and replace the MySQL data with Jan 28 2007 (in its original Unix timestamp format).
This is the current date format stored in our DB ==> 1106933160 for Jan 28, 2005 at 09:26 AM
Must also do the following:
1. Retain the original time (from example above “09:26 AM”)
2. The find MONTH, DAY, and YEAR pull-downs must also have a wildcard. So, if I search for Jan 28 "*" from pull-down menu, the query would search for Jan 28 of any year. Likewise, If I search for June * 2005, and I set the replace date to June 24 2007, the all dates found in June 2005 would be changed to June 24 2007.
3. Must be able to change the “database name”, “table name”, and field name” as I will use this script to update dates in different tables.
A working DEMO will go a long way with my selection.