The official web hosting company for the BlueVoda Website Builder. You are currently viewing our support forum as a guest which gives you limited (read only) access. By joining our support forum you will be able to ask questions, participate in discussions and receive assistance. Registration is fast and simple. Click Here To Join our support forum today! We look forward to helping you build and publish a fantastic website.
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.
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...
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.
Comment