Developing a PHP script that will replace the items in a table by the IDs of the corresponding items from another table
$10-30 USD
完了済み
投稿日: 9年以上前
$10-30 USD
完了時にお支払い
We have two tables:
- A table “centers” which gather together the center's addresses
- A table “town” which gather together all the cities in France and their IDs.
We would like you to develop a PHP script that would automatically fill the field “town_id” in the table “centres” with the corresponding town's ID from the table “town”.
We would like to be able to re-use this script so we need something handy we can access from a page, with a button for starting the script and a message to know when it’s done.
In order to do so, you must fulfill these two conditions:
- The field “name” from the table “town” equals the field “town” from the table “centres”;
- The first two digits of the field "ville_code_postal" from the table “town” equals the first two digits of the field “cp” from the table “centres”.
Then, we should fill the field "town_id" from the table "centers" with the corresponding ID from the table "town".
2 special cases to manage:
• the towns with the first two digits from the field "cp" = 97
- The field “name” from the table “town” equals the field “town” from the table “centres”;
- The first three digits of the field "ville_code_postal" from the table “town” equals the first three digits of the field “cp” from the table “centres”.
Then, we should fill the field "town_id" from the table "centers" with the corresponding ID from the table "town".
• the towns with the first two digits from the field "cp" = 75
The five digits of the field "ville_code_postal" from the table “town” equals the five digits of the field “cp” from the table “centres”.
Then, we should fill the field "town_id" from the table "centers" with the corresponding ID from the table "town".
Hi, I'm expert with more than 3 years experienced in PHP development and ready to work on your project RIGHT NOW, get your project done in next 1 hour. Look forward your contact. Thanks.
I have 3 years experience in web developing using wordpress.I have sound knowledge in php, jquery, javascript,css and html. I am ready to do this task. Pls check my previous work and hire me sir.I have completed 40 wordpress task. Thanks