Find Jobs
Hire Freelancers

php automatic data inserter

$15-20 USD

Closed
Posted about 14 years ago

$15-20 USD

Paid on delivery
I need a PHP class and function which will allow me to save PHP data in the MySQL database without having to create any table ahead of time. It should work like this: 1. I will instantiate the class passing ($resource, $tableName) to the constructor, where $resource is a valid MySQL connection and $tableName is the name of a table. 2. I will call a function: insert($array) one time for each row of data. The $array will be an associative array of names and values. The function will save this in the database per the Detailed Specification below. DETAILED SPECIFICATION ====================== - During instantiation, the class must automatically perform a 'show columns' to introspect the database and see if the table already exists and what column names and types are already created. - During insertion, the insert() function will automatically expand the table as follows. Columns will be created with the same name as the array key, if the column does not already exist. Each value in the associated array goes to the column that corresponds to its array key. - Each column must be created and maintained using the most restrictive possible type for the data inserted so far; e.g. INTEGER, then DECIMAL, then VARCHAR, then LONGTEXT. That means an ALTER TABLE should be executed prior to inserting new data into a column to expand it to a less restrictive type if the original type would not accommodate the new data. - For testing, the coder must write a main() method which invokes the constructor and insert() methods described above, with some semi-random sample data. - The class may be instantiated again at a later time to add more data; therefore the table metadata must always be refreshed in the constructor. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). 4) Proof of testing, in the form of screenshots and/or output logs and explanation of results. * * *This broadcast message was sent to all bidders on Sunday Mar 14, 2010 12:21:11 PM: PLEASE KEEP IT SIMPLE WITH THE FOLLOWING ASSUMPTIONS. THERE WILL NOT BE ANY MULTI-DIMENSIONAL ARRAYS REQUIREMENT. ONLY FLAT KEY/VALUE PAIRS. ALL KEYS WILL BE VALID TO USE AS IDENTIFIERS. ALL VALUES WILL BE VALID PHP STRINGS (NO ARRAYS OR OBJECTS AS VALUES). ## Platform PHP
Project ID: 3259081

About the project

12 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
12 freelancers are bidding on average $42 USD for this job
User Avatar
See private message.
$157.25 USD in 2 days
4.9 (276 reviews)
6.9
6.9
User Avatar
See private message.
$17 USD in 2 days
4.9 (80 reviews)
5.5
5.5
User Avatar
See private message.
$68 USD in 2 days
4.8 (40 reviews)
5.4
5.4
User Avatar
See private message.
$17 USD in 2 days
5.0 (8 reviews)
3.0
3.0
User Avatar
See private message.
$17 USD in 2 days
4.7 (16 reviews)
2.9
2.9
User Avatar
See private message.
$68.85 USD in 2 days
5.0 (10 reviews)
2.7
2.7
User Avatar
See private message.
$55.25 USD in 2 days
5.0 (4 reviews)
1.5
1.5
User Avatar
See private message.
$11.05 USD in 2 days
3.1 (14 reviews)
1.8
1.8
User Avatar
See private message.
$25.50 USD in 2 days
5.0 (6 reviews)
0.5
0.5
User Avatar
See private message.
$17 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$12.75 USD in 2 days
0.0 (4 reviews)
0.0
0.0
User Avatar
See private message.
$42.50 USD in 2 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
San Diego, United States
5.0
295
Payment method verified
Member since Aug 17, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.