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

MySQL Error Message

New Here ,
Dec 18, 2007 Dec 18, 2007

Copy link to clipboard

Copied

Just learned the basics of dynamic content within the last week through resources here at Adobe and really dont know where to start looking to fix this error so I came here.

The error keeps coming up when I try to edit a table's query.

SQL query:

A

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A' at line 1

But the thing is when I edit on my local wamp server it edits just fine and saves. So I've pretty much narrowed it down to something that has to do with my user/password on my isp server.

I'm just a beginner and this question has probably been asked before, so go easy on me.
TOPICS
Server side applications

Views

515
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 ,
Dec 18, 2007 Dec 18, 2007

Copy link to clipboard

Copied

For now, I'm exporting the daatabase in a .sql file and editing it in notepad - deleting the old database and then re-importing the updated database....

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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

JohnGJ wrote:
> The error keeps coming up when I try to edit a table's query.
>
> SQL query:
>
> A
>
> MySQL said: Documentation
> #1064 - You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near 'A'
> at line 1

Is that the entire SQL query? No wonder you're getting an error. Simply
typing A is meaningless in SQL.

What is it that you're trying to do?

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

The table is based on news articles I'm submitting to the query and then they show up on the site in various places. I go into the table, click browse, and then edit one of the news stories. After I click save, it takes me to that error page.

If I do this same exact thing on phpMyAdmin on my wamp server it works just fine. It saves everything and updates the information on the website.

I'm almost positive it has something to do with my user privileges on my isp server. But I'm the admin so I don't know why it would be doing that.

As for the "A" that shows under "SQL query:", I have no idea what that is.

I hope this doesn't confuse you anymore then it already did.

Thanks

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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

maybe this helps help clarify even more...

When I update the query on my wamp server phpmyadmin I get this message after I update, showing that it was completed.

SQL query:
UPDATE `risingstar`.`news` SET `fullarticle` = 'Stand out rookie...(followed by a 4 paragraph article)

Now when I do the exact same thing on my isp server's phpmyadmin, I get this...

SQL query:

A

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A' at line 1.


Why does it save the query as "A" might be a better question here?

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
Guest
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

You might want to check and see if your 4 paragraph article has any single quotes or other non alpha/numeric characters that mean somehting in MySQL.

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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

I found these in the article:

Also, don’t forget...

follow this rising star’s progress...

I changed them to apostrophe's and still got the same error message.

I have the same exact article on my local server, and it works fine when I update it.

This seems like a very unique problem as I cant find it anywhere on any other forums. I'll write to my isp's customer service support team and see if they can log into my database and find the problem...

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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

JohnGJ wrote:
> I changed them to apostrophe's and still got the same error message.
>
> I have the same exact article on my local server, and it works fine when I
> update it.
>
> This seems like a very unique problem as I cant find it anywhere on any other
> forums.

No, it's not a very unique problem. It's almost certainly a question of
incorrectly escaped quotes or special characters. The server behaviors
in Dreamweaver handle all of this correctly for you. If you're
hand-coding, you need to remove any magic quotes and filter your data
through mysql_real_escape_string(). More details here:

http://docs.php.net/manual/en/function.mysql-real-escape-string.php

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

I messaged the customer support team at my isp and this is what I got:
----------------------------------
the issue you are experiencing is caused by a common bug in the cPanel proxy which redirects you to phpmyadmin.

However, this can easily be avoided by accessing the cPanel from http://yourdomain.com/cpanel/

This way you should not be redirected through the cPanel proxy and you will not experience the bug.
------------------------------------------
I went to my cpanel in the way they described and now it works just fine.

Thanks David and Triplets for your help.

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 ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

Another simple question I have is...

Is there a better way to update the query of a certain table without logging into phpmyadmin, click "browse", and then editing a row in the query?

I do not know php enough to do it by hand, so if there is another way that would be what I'm looking for.

Thank you

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
Guest
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

LATEST
I would definately recommend reading David's book "Dreamweaver CS3 with CSS, Ajax, and PHP. David walks you through how to use dreamweaver to do what you want.

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