Hi, this is a very simple work, and very well detailed. I expect to be done and tested in just one day.
I need a page in php to import txt values into mysql database.
Need to save as unicode characters and accepts characters like ' that can be part of names.
Will give you access to a test mysql database.
the columns of txt file are as follow : mapped to each [login to view URL] :
KIDNAME : KID.KID_NAME
PARENTNAME : CUSTOMER.CUSTOMER_NAME
EMAIL : [login to view URL]
RM : [login to view URL]
CLASSROOM : GROUP.GROUP_NAME
KIDNAME, PARENTNAME AND EMAIL ARE MANDATORY FIELDS
RM AND CLASSROOOM ARE OPTIONAL
THERE ARE NO DUPLICATES KIDNAME
A PARENTNAME CAN HAVE ONLY ONE EMAIL ( EMAIL IS UNIQUE )
A PARENTNAME CAN HAVE MORE THAN ONE KID
RECORDS WITHOUT MANDATORY FIELS SHOULD BE IGNORED AND LISTED AT THE END OF THE IMPORT ROUTINE.
SAME TO RECORDS WITH INVALID EMAIL
the user will copy all values, without a first row with column names, and field separated by pipe (|)
also will have one input box for each of the following fields
mycustomer.id_company ( integer type )
[login to view URL]
[login to view URL] ( varchar type )
[login to view URL] ( smallinteger type )
below are the tables that need to be filled
customer
(PK)id_customer ( auto number )
customer_name ( input by user )
password ( default value for all records, input by user )
(UK)email ( input by user, used a unique key )
date_created
mycustomer
(PK)id_mycustomer ( auto number )
(FK)id_customer ( from table customer )
(FK)id_company ( typed by user )
date_created
kid
(PK)id_kid ( auto number )
kid_name ( input by user )
RM ( varchar 20 )
itinerary
(PK)id_itinerary ( auto number )
itineraryname ( default value for all records, input by user )
(FK)id_company ( default value for all records, input by user )
customer_id ( from table customer.id_customer )
selectKidsonMainPag ( default value : 0 )
auto ( null )
autotime ( null )
itinerary_kid
(FK)id_itinerary ( from table itinerary )
(FK)id_kid ( from table kid )
mykid
(PK)id_mykid ( autonumber )
(FK)id_company ( default value for all records, input by user )
(FK)id_customer ( from table customer )
(FK)id_kid ( from table kid )
(FK)id_itinerary ( from table itinerary )
group
(PK)id_group ( auto number )
(FK)id_company ( default value for all records, input by user )
group_name ( input by user )
year ( input by user )
group_kid
(FK)id_group ( from table group )
(FK)id_kid ( from table kid )
Here is a suggested logic to import the values
0 - delete all records of that company : I will send you the sql´s to delete the records.
for each row do the following steps :
1 - Create records of table group :
Based on year, id_company and group_name check if record exists, if not, create it. Return id_group
2 - Create records of customer ( parent ) :
Based on email check if record exists, if not create, if yes, update its name and password ( md5 ). Return id_customer
3 - create itinerary
Based on id_customer and id_company check if record exists, if not create. Return id_itinerary
4 - Create mycustomer
based on id_customer and id_company check if exists, if not, creates. ( use values returned from previous steps )
5 - Create kid
always insert kids. Return id_kid
6 - create itinerary_kid
always insert ( use values returned from previous steps )
7 - Create mykid :
always insert mykid ( use values returned from previous steps )
8 - Create group_kid
always insert group_kid ( use values returned from previous steps )
Attached is a sample file.
Dear sir,
I am interested in your project. I have read your project description carefully, also the .txt file.
With 7 years experience about PHP, MySql, I can give you solution with perfect accurate.
Thank you for your attention,
thanhhungqb
$70 USD in 1 day
5.0 (26 reviews)
4.2
4.2
12 freelancers are bidding on average $131 USD for this job
Hi,
I'm senior web developer and I'm very interested in your project.
Hope I will have a chance to work for you on this project.
Please contact me.
Thanks
Hi, I make you this PHP page where you can upload txt file and it will parse the file and insert values into correct tables. The page should check for duplicate names and other rules ( based on your requirements). I really hope we can work. thank you
Hi Dear,
I am having 7+ yrs of exp in PHP/MYSQL. I have viewed the txt file you have shared. I can implement the project for you as per your requirement.