Need PHP programmer to make script to update MySQL database
$30-100 USD
Færdiggjort
Slået op over 16 år siden
$30-100 USD
Betales ved levering
FIELDS: ID, Column1, Column2, etc.
1. I need a PHP script for my MySQL database that will update a field (Column1) in all rows found with a text that I will define.
2. The rows to appear in the results are rows that have duplicate content with other rows regarding a field (Column1)
3. The script will need to search all tables containing a specific text (for exemple, search all tables in a database containing the word "data" in the table's name)
4. Moreover, within the duplicated rows, all of them must be updated (as stated in point 1.) ...except the row with the oldest datetime date within the same table (between the rows with the same duplicate content)
5. The search must only take into consideration rows where Column1 have at least x number of character (for example... 3... in this example below)
6. I would like options in a config file to: set if i want to run in test mode (showing all results found without updating the data), set the number of character minimum to consider, set the table's name keyword to consider, set the number of rows NOT to be updated (see point 4.)
7. I would like another search option that does the following: update all the row's field (Column1) if a string that I provide is found exactly or within other rows' field (Column1)... including all tables with a specific keyword (like in point 3.) I would also like a test mode for point 7.
EXAMPLE: (for points 1 to 5)
table_house (column with the date related to table "table_house_data" below) ...the date table is a table without the "_data" suffix
ID | Date (datetime type)
1 | 2005-07-15 16:32:54
2 | 2005-04-20 16:32:54
3 | 2005-12-30 16:32:54
4 | 2005-08-08 16:32:54
table_car
ID | Date
1 | 2001-07-15 16:32:54
2 | 2005-04-20 16:32:54
3 | 2003-12-30 16:32:54
4 | 2007-08-08 16:32:54
table_monkey
ID | Date
1 | 2006-05-15 16:32:54
2 | 2000-03-20 16:32:54
table_house_data
ID | Column1
1 | hey you yada
2 | money
3 | plane
4 | money
table_car_data
ID | Column1
1 | money
2 | hi
3 | hi
4 | plane
table_monkey_someothertable
ID | Column1
1 | money
2 | plane
The script would output (to show the duplicates):
DUPLICATE | TABLENAME | ID | DATE
money | table_house_data | 2 | 2005-04-20 16:32:54
money | table_house_data | 4 | 2005-08-08 16:32:54
money | table_car_data | 1 | 2001-07-15 16:32:54
plane | table_house_data | 3 | 2005-12-30 16:32:54
plane | table_car_data | 4 | 2007-08-08 16:32:54
And it will only update
money | table_house_data | 2 | 2005-04-20 16:32:54
money | table_house_data | 4 | 2005-08-08 16:32:54
plane | table_car_data | 4 | 2007-08-08 16:32:54
...and replace "money", "plane" or any other string in the result by a text that a would decide.
Hello!
I can do it for You for only $95.
It will take me no longer than 24-48 hours.
If You choose me I will do my best to do it as soon as possible.
thanks
Birdwatcher
Our organisation Xtreme Logique is the brainchild of talents blended with Experience and Expertise of multi-dimensioned personalities in various technologies. Xtreme Logique is being headed by a person who has more than 20 years of solid experience in IT field and accompanied by Young Talented Engineers with two and half years of experience each in very reputed IT companies.