URGENT php mysql code to manipulate a string of text from a mysql database and insert in a new table
- Status: Closed
- Prize: $20
- Entries Received: 3
- Winner: SmartChoice Solutions
Contest Brief
i have a database with a column called "message" in the format below
007 2020 1234567890 0987654321 5432167890
007 is staffID
2020 is managerID
1234567890 is subscriber1
0987654321 is subscriber2
5432167890 is subscriber3
The first three values are compulsory for a message to be valid while the remaining 9 (subscriber2..subscriber10) are optional.
Some messages may have up to 10 subscriber numbers listed e.g
007 2020 1234567890 0987654321 5432167890 5432667890 7432167890 9432167890
I need a web page/script that will parse the contents of the message field and use to build a new table of analyzed data. The source database table is updated externally every few minutes so I would like to put this script in cron to pick up any new messages that may have been inserted.
the analyzed table should break the message down as follows:
If a message has 3 subscriber numbers listed, 3 rows should be inserted in the table for parsed data
007 2020 1234567890 0987654321 5432167890 will become
staffID managerID subscriberID
007 | 2020 | 1234567890
007 | 2020 | 0987654321
007 | 2020 | 5432167890
the date column from the source database will be parsed and replicated as-is. all the parsed values should also be visible from within a web page.
structure of the source database table is attached.
this contest is only posted on the condition that i get this done within an hour or two. no entries will be selected later.
Recommended Skills
Employer Feedback
“Excellent php and mysql work at short notice. Good-natured chap. Will use again.”
gandalfx2, Nigeria.
Public Clarification Board
How to get started with contests
-
Post Your Contest Quick and easy
-
Get Tons of Entries From around the world
-
Award the best entry Download the files - Easy!