Advertisement

07.17.2008 at 10:31PM PDT, ID: 23575862
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

CSV file into mysql database using PHP

Asked by ssjo22 in PHP Scripting Language, MySQL Server

Tags: , , ,

Hi, I know very basic scripting but am getting confused with the mysql portion. I need a PHP script to import CSV file into mysql database.

I have a CSV file exported from Excel that contains 5 columns:
userid, firstname, lastname, password in text format which needs to be md5, and email address.

These 5 columns need to be imported into an existing mysql database that already has existing tables and data. I believe it needs something like this:
INSERT INTO table_members SET group_id=5, username= ....  and then username needs to come from the csv file.

The row inserted into table_members also needs:
- a uniqueNumber - a random 32 character string, used for session cookies.
-  ip_address (just put in 127.0.0.1 is fine)
-  date - Unix time stamp correlated to GMT time. (just whatever time is fine, just proper format?)

Then, there are 2 more tables that needs a row for each new member. Using the member_id of the member as reference:
- table_memberd  (this table also needs to add from the CSV file the firstname and lastname)
- table_memberh (this table just needs to add row with member_id and no data for the columns in this table)

I'm thinking that when inserting in table_members, that the script gets the last member_id that was used the next new member uses the next member_id.

Hope that makes sense! Help is so much appreciated.
Thanks!Start Free Trial
[+][-]07.17.2008 at 11:24PM PDT, ID: 22033217

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP Scripting Language, MySQL Server
Tags: php, mysql, csv, import
Sign Up Now!
Solution Provided By: Roonaan
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.18.2008 at 08:24AM PDT, ID: 22036790

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 09:30AM PDT, ID: 22037526

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 09:33AM PDT, ID: 22037559

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 10:26PM PDT, ID: 22041441

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.20.2008 at 09:19AM PDT, ID: 22046139

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 10:22AM PDT, ID: 22046317

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 12:37PM PDT, ID: 22046680

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 12:47PM PDT, ID: 22046710

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 10:11PM PDT, ID: 22048149

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.21.2008 at 12:31AM PDT, ID: 22048524

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.21.2008 at 12:52AM PDT, ID: 22048611

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_EXPERT_20070906