Results 1 to 4 of 4

Thread: csv database-HELP-URGENT
      
   

  1. #1
    Ginger is offline Members
    Join Date
    May 2005
    Posts
    15

    Exclamation 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. #2
    VodaHost's Avatar
    VodaHost is offline General & Forum Administrator
    Join Date
    Mar 2005
    Location
    Wilmington, Delaware USA
    Posts
    11,428

    Default

    have you created the tables in mysql ?

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

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

    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)



  3. #3
    VodaHost's Avatar
    VodaHost is offline General & Forum Administrator
    Join Date
    Mar 2005
    Location
    Wilmington, Delaware USA
    Posts
    11,428

    Default

    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
    07031847328 / United Kingdom

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

    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)



  4. #4
    sburner is offline Corporal
    Join Date
    Aug 2005
    Posts
    18

    Default

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Uploading MySQL Database
    By charlwillia6 in forum mySQL & PHP
    Replies: 3
    Last Post: 09-23-2005, 10:08 AM
  2. creating database
    By sufian in forum General Support Issues
    Replies: 1
    Last Post: 09-20-2005, 07:38 PM
  3. database
    By csypher in forum mySQL & PHP
    Replies: 1
    Last Post: 08-24-2005, 09:58 AM
  4. Database Setup
    By Patti Johnson in forum cPanel - Control Panel
    Replies: 6
    Last Post: 08-19-2005, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49