Announcement

Collapse
No announcement yet.

csv database-HELP-URGENT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • csv database-HELP-URGENT

    How do I upload/dump/or import a large csv database containing pictures and text into mysql; I presume its through phpmyadmin but I can't figure out
    what do.

  • #2
    have you created the tables in mysql ?

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment


    • #3
      Hi Ginger,

      You have made close to 15 database related posts in this forum and open just
      as many database related support tickets.

      Please understand...constructing back end database with a front end user
      interface is not a easy matter and definitely can NOT be explained or outlined in a couple of paragraphs in a support ticket.

      People study for months and take courses on this topic. Your best bet is to hire a professional. This is what most people do. You can find a cheap one at...

      www.scriptlance.com

      I hope this is helpful.

      *****

      VodaHost

      Your Website People!
      1-302-283-3777 North America / International
      02036089024 / United Kingdom
      291916438 / Australia

      ------------------------

      Top 3 Best Sellers

      Web Hosting - Unlimited disk space & bandwidth.

      Reseller Hosting - Start your own web hosting business.

      Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


      Comment


      • #4
        You cannot create a mysql database using a csv file, you have to first create the database manually.

        Once you did this, you can use phpmyadmin's "Insert data from a text file into the table" function. I don't know about the pictures part but this should do the trick. Excell databases are tricky.

        try this:

        phpMyAdmin easily allows you to import whole tables of data in comma-separated or tab-separated format. Just look for the "Insert textfiles into table" link when you are viewing a table's properties.

        This of course means that you have to create the table first, before you import the data to fit into the columns.

        So it goes in this order:

        1) create table with exactly the same number of fields as your Excel sheet.

        2) make sure those fields have the right datatype to accept the data in the related columns in the spreadsheet.

        3) Save as comma-separated .CSV or tab-separated .TXT file in Excel (I recommend tab-separated, because excel is a little weird sometimes about what it surrounds with quotes and what it doesn't. Be careful about having tabs inside your data, though)

        4) View your table properties in phpMyAdmin, click on "Insert textfiles into table",
        a. Set "Fields terminated by" to \t (for tab-delimited) or , (for comma-separated)
        b. Set "Lines terminated by" to \r\n
        c. click on "Browse" and upload your file.

        I'm sure you noticed the "Fields enclosed by" and "Optionally" choices. The only caveat with Excel-to-MySQL is that Excel will only enclose cells with quotes IF the field separator (comma or tab) occurs within that cell's data, so it's kind of willy-nilly. MySQL either expects ALL fields to have quotes, or (Optionally) all Text fields to have quotes. If your data is too complex, you might have an easier time copying it into an Access table, because Access gives you more control over output to text/CSV.
        good luck

        Comment

        Working...
        X