![phoenix](https://d1a29h5kxv3oc2.cloudfront.net/dist/img/phoenix.81914efc7207f6a059bd10f5d3fd5f89.png)
Mysql data import from txt file using php
- or -
Post a project like this2792
$$
- Posted:
- Proposals: 3
- Remote
- #1550285
- Completed
Description
Experience Level: Intermediate
General information for the website: Internal project control php site
Kind of development: New website from scratch
Num. of web pages/modules: 1
Description of every page/module: A demo php file which can upload a user .txt file and parse the data in to a mysql table.
The page should have some method to allow the user to select a file to upload the supplied excel.txt file ready for processing.
Description of requirements/features: Once the file is received then each line of the data must be parsed (following the TableInformaion.png layout). Please note that the ProjectID and LastUpdated columns are the unique key. The processing should not reimport lines which have been imported before.
excel.txt is exactly how a report is received. The only difference with future reports shall be the total number of lines which will also result in more page breaks and more data between the page breaks.
As an example, the first line will import as;
INSERT INTO `itmprojectcontrol`.`tblprojectimport` (`ProjectID`, `LastUpdated`, `Description`, `DeliveryDate`, `TotalSalesPrice`, `TotalInoviced`, `ProjectStatus`, `MaterialCost`, `LabourHours`, `LabourCost`, `OverheadCost`, `GeneralCost`) VALUES ('300001', '2017-04-27 09:29:00', 'HP20+', '1998-02-20', '85200.00', '85200.00', 'Closed', '482.84', '203.25', '2327.40', '3646.3', '0');
Points to note,
Some of the lines have "" which is to allow for the exporting of , and " characters. Please let me know if there is a problem importing these lines in the currently proposed database schema.
An example of this is with the line "300807 |""A Flap"" Gluing Unit |14-07-11| 4637.93| 4637.93| Closed | 353.96| 00.00| 00.00| 00.00| 0 |"
Some lines do not have a Description. This is OK.
Some lines do not have a DeliveryDate. This is OK.
Years are exported as YY rather than YYYY. There will be no projects earlier than 1980. Therefore 98 should be converted to 1998, 79 should be converted to 2079 and 80 should be 1980.
Extra notes: Let me know if you have any questions or other suggestions as this is the first stage of a big project.
Kind of development: New website from scratch
Num. of web pages/modules: 1
Description of every page/module: A demo php file which can upload a user .txt file and parse the data in to a mysql table.
The page should have some method to allow the user to select a file to upload the supplied excel.txt file ready for processing.
Description of requirements/features: Once the file is received then each line of the data must be parsed (following the TableInformaion.png layout). Please note that the ProjectID and LastUpdated columns are the unique key. The processing should not reimport lines which have been imported before.
excel.txt is exactly how a report is received. The only difference with future reports shall be the total number of lines which will also result in more page breaks and more data between the page breaks.
As an example, the first line will import as;
INSERT INTO `itmprojectcontrol`.`tblprojectimport` (`ProjectID`, `LastUpdated`, `Description`, `DeliveryDate`, `TotalSalesPrice`, `TotalInoviced`, `ProjectStatus`, `MaterialCost`, `LabourHours`, `LabourCost`, `OverheadCost`, `GeneralCost`) VALUES ('300001', '2017-04-27 09:29:00', 'HP20+', '1998-02-20', '85200.00', '85200.00', 'Closed', '482.84', '203.25', '2327.40', '3646.3', '0');
Points to note,
Some of the lines have "" which is to allow for the exporting of , and " characters. Please let me know if there is a problem importing these lines in the currently proposed database schema.
An example of this is with the line "300807 |""A Flap"" Gluing Unit |14-07-11| 4637.93| 4637.93| Closed | 353.96| 00.00| 00.00| 00.00| 0 |"
Some lines do not have a Description. This is OK.
Some lines do not have a DeliveryDate. This is OK.
Years are exported as YY rather than YYYY. There will be no projects earlier than 1980. Therefore 98 should be converted to 1998, 79 should be converted to 2079 and 80 should be 1980.
Extra notes: Let me know if you have any questions or other suggestions as this is the first stage of a big project.
![Ben H.](https://dw3i9sxi97owk.cloudfront.net/uploads/thumbs/6dc9f787e58eff00a91e0a1705dd5839_150x150.jpg)
Ben H.
100% (22)Projects Completed
19
Freelancers worked with
12
Projects awarded
42%
Last project
25 Nov 2024
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies