Jump to content

Recommended Posts

Posted

hey guys.

 

It's been a while since i posted to this forum. Hope everyone is doing great and had a fun 2006.

 

So as part of my new years resolution, i told myself i was going to learn more about working with PHP and MySQL. I have become pretty comfortable working with HTML and CSS, but the only back end programming languages that i have am comfortable with are ASP and C#. I'm slowly begining to understand PHP and MySQL (I bought the book Sams Teach Yourself PHP, MySQL and Apache All in One and am slowly trudging through it), but still had a few questions...

 

do you guys know if there are any online examples or anything of the sort to import data from an excel sheet into a mysql database? those of you that work with MySQL, what is the most common way to populate data into a database (besides manually entering)?

 

Also any additional online tutorials would be great!

 

Thanks!

 

Sam

Posted

If you do a Google search, there are a few tutorials and examples. I haven't used any so I don't know how good they are.

 

Personally, if I was going to transfer from Excel to MySQL I'd probably save it as a CSV and then something like the following from cpanel;

 

>LOAD DATA LOCAL INFILE 'filename.csv' INTO TABLE table FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

 

You could also code PHP to read the file and place the data into the tables.

 

Although I'm sure there will be folk along to tell you a better method though ...

Posted
Personally, if I was going to transfer from Excel to MySQL I'd probably save it as a CSV and then something like the following from cpanel;

 

>LOAD DATA LOCAL INFILE 'filename.csv' INTO TABLE table FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

 

 

Thanks Andy. This sounds very do-able for a beginner. I will mess around with it tonight and let you know what i come up with.

 

Sam

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...