MYSQL Database and PHP Code

This project was successfully completed by electriccoder for $200.6 USD in 14 days.

Get free quotes for a project like this
Project Budget
$30 - $5000 USD
Completed In
14 days
Total Bids
Project Description


I need 4 things developed (full details below)

[1] 1 Table in a MYSQLDatabase (but will have up to 1 Million entries)

[2] PHP Function to Validate Data from a form and popup error message to user

[3] PHP Function to Enter Data Into MYSQL Table

[4] Extract Feature To Download contents of Database into CSV format

## Deliverables

This is the 1st Draft of the Requirements




Database Type: MYSQL Database

I need someone to setup a MYSQL database which will contain 1 table.

This table will have 8 columns with up to 1 Million Row.

Required Field? Field Type Example Of What Could Be In Table

Y Primary Key Number

Y DateAdded Date Automatically Generated

N Sex Number

N Seeking Number

N IP TEXT up to 20 chars [url removed, login to view]

N Email Text up to 200 chars

N Tracking Text up to 100 chars

N Username Text up to 100 chars


[2] PHP FUNCTION - Validate


This is code that can be called through PHP on a web page

It is to validate the information being sent to it.

This information will have been inputted by a user using a form.

If there is an error, a window popup should happen to tell user of the error.

This function will be provided

* Username (Text up to 100 chars)

* Email (Text up to 200 Chars)

The function will then need to:

1. Validate the Email

* Use Rules to make as sure as possible it is a valid email addreess

2. Validate the Username

* Username has to be -- 4 - 16 characters long, no spaces or special characters.

3. If it fails validation then

* Popup a window that tell users what they did wrong

* return from php function a 0

4. If it passes validation - return a 1




This is code that can be called through PHP on a web page

This function will be provided

* Sex (Number)

* Seeking (Number)

* Username (Text up to 100 chars)

* IP Address (Text up to 20 chars)

* Email (Text up to 200 Chars)

* Tracking (Text up to 100 chars)

* The name/location of the MYSQL database

The function will then need to:

1. If the Email is already in the database then return the primary key number for that entry

2. If the Email is NOT already in the MYSQL Database, then

a. The details will be added as a new entry - with the dateadded field usin todays date

b. The Primary Key Will be Returned

3. If an error occurs, then it will return a 0




I will need you to develop a way (either a procedure or a tool etc) to extract the data from the MYSQL database into a CSV file in two different ways

* All of the Database

* Database Entries that were added between Date A and Date B (i.e using dateadded column)




[1] While the Database is up to 1 million entries in size, it will be awhile till it reaches over 100k in size. It is important that the database table and/or the PHP function is optimized so that it takes as little time as possible for the PHP function to return a value while getting up to about 100k entries in the database.

Explain how you would optimize the MYSQL DB table and/or PHP Function.

[2] Give example of previous work where you have used MYSQL DB and php function calls (especially interested in work here large Databases were used).

[3] Tell me how long you think it would take to develop these 4 items.

[4] Tell me at a high level how you plan on validating the email in the 2) PHP Function - Validate

I look forward to your response.

Completed by:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online