Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Import CVS file to Mysql

New Here ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

Hi,
I am trying to import a database from excel into mysql on myphpadmin. I create the database name and the table and then to go import at top and locate the cvs file, but I get a error every time #1064 error. How do you get the information from the data in excel into the table?

Thanks for any help you can provide.

Dennis
TOPICS
Server side applications

Views

915
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

carbiz wrote:
> I am trying to import a database from excel into mysql on myphpadmin. I
> create the database name and the table and then to go import at top and locate
> the cvs file, but I get a error every time #1064 error.

#1064 is a SQL error. It's possible that your CVS uses MySQL reserved
words. Without knowing what's in the CVS file, it's impossible to say.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

here is the file it called test.
Part# Title Cost
12345 Garmin 129

Thanks for any help you can provide. I also left you a message on your forum for your book, DW CS3 with CSS, Ajax, and PHP. I was able to connect to your sample database from your book and get input back from feedback_start_php file. What am I doing wrong??

Thanks,
Den

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

Well, that's not a CSV file.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"carbiz" <webforumsuser@macromedia.com> wrote in message
news:ggphva$84c$1@forums.macromedia.com...
> here is the file it called test.
> Part# Title Cost
> 12345 Garmin 129
>
> Thanks for any help you can provide. I also left you a message on your
> forum
> for your book, DW CS3 with CSS, Ajax, and PHP. I was able to connect to
> your
> sample database from your book and get input back from feedback_start_php
> file.
> What am I doing wrong??
>
> Thanks,
> Den
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

I saved it as test.csv in excel
Here is the sample file:

Part# Title Cost
12345 Garmin 129

Is this not correct? Should i save it in another format in excel? What other way can I do it correctly?

Thanks,
Dennis

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

CSV means "Comma Separated Value". What delimiter did you select when you
did that? I'm not seeing any delimiters in what you have copied below. In
addition, you would not want to import the field names. So - to be a
regular CSV file for import into your database, I would expect it to look
like this -

12345,Garmin,129

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"carbiz" <webforumsuser@macromedia.com> wrote in message
news:ggpkoe$b6i$1@forums.macromedia.com...
>I saved it as test.csv in excel
> Here is the sample file:
>
> Part# Title Cost
> 12345 Garmin 129
>
> Is this not correct? Should i save it in another format in excel? What
> other
> way can I do it correctly?
>
> Thanks,
> Dennis
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

Thanks. i will take the field names out and try it. Should i save it as a xml file instead?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

Murray *ACE* wrote:
> CSV means "Comma Separated Value".

Yes, it does; but CSV files can have different separators. They don't
need to be commas. CSV is a generic name, rather than an exact description.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

carbiz wrote:
> here is the file it called test.
> Part# Title Cost
> 12345 Garmin 129
>
> Thanks for any help you can provide. I also left you a message on your forum
> for your book, DW CS3 with CSS, Ajax, and PHP.

Yes, I know you did. Now you're expecting me to answer the same question
in two places. Please don't do that.

As I have explained on my own website, the problem is the # in Part#.
It's an illegal character in a column name.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

the error still is there even though I took out the # in the column heading.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

LATEST
carbiz wrote:
> the error still is there even though I took out the # in the column heading.

Dennis, please read page xxx of my book again. I don't mind helping out
with problems, but I don't want to have to repeat my answers in two
places. Keep the conversation in one place. I have given you details of
how to import your test CSV file on my site.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 28, 2008 Nov 28, 2008

Copy link to clipboard

Copied

CSV? 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"David Powers" <david@example.com> wrote in message
news:ggpfel$59d$1@forums.macromedia.com...
> carbiz wrote:
>> I am trying to import a database from excel into mysql on myphpadmin. I
>> create the database name and the table and then to go import at top and
>> locate the cvs file, but I get a error every time #1064 error.
>
> #1064 is a SQL error. It's possible that your CVS uses MySQL reserved
> words. Without knowing what's in the CVS file, it's impossible to say.
>
> --
> David Powers, Adobe Community Expert
> Author, "The Essential Guide to Dreamweaver CS4",
> "PHP Solutions" & "PHP Object-Oriented Solutions"
> http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines