Jump to content


Easier Way?

  • Please log in to reply
2 replies to this topic

#1 ItsWesYo

  • Members
  • PipPipPip
  • Advanced Member
  • 110 posts

Posted 20 August 2006 - 10:18 PM

Is there an easier way to add about 406 items (names of items) into a database?

I will not:
a) add 2 at a time using the insert thing in myphpadmin
b) take my time typing ('item1'),('item2'),etc (takes a long time)

Any easier way?

#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 20 August 2006 - 11:27 PM

Put the data relevant to 406 things in an Excel spreadsheet with the same column order as your database table and then export the data as a CSV file which you can then import directly into your database using phpmyadmin.
Legend has it that reading the manual never killed anyone.
My site

#3 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 21 August 2006 - 05:34 PM

Also, depending on the source file itself, it should be trivial to generate a whole bunch of INSERT statements with a half-decent text editor and some macros / regexs.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users