Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9163991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:34:26+00:00 2026-06-17T14:34:26+00:00

Here is what I am getting when I use single line comment (using —

  • 0

Here is what I am getting when I use single line comment (using —):

ERROR 1064 (42000): You have an error in your SQL syntax

Actually I am using these comments in a procedure to show what exactly a line does. Then I checked directly at the MySQL command line, but I got this error:

mysql> select 1;--test select
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

    -> ;
check the manual that corresponds to your MySQL server version for the right syntax to use near '--test select' at line 1

Do I need to configure a file to support this? It is working fine if I use multi-line comments (using /* Something */).

I googled and went through MySQL documentation. In that it has shown me it supports ( — ).
What could be the error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:34:27+00:00Added an answer on June 17, 2026 at 2:34 pm

    From MySQL documentation:

    From a “– ” sequence to the end of the line. In MySQL, the “– ” (double-dash) comment style requires the second dash to be followed by
    at least one whitespace or control character (such as a space, tab,
    newline, and so on).

    You need some space character after --, for example:

    mysql> select 1;-- test select
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting syntax error in firebug here is the code : $('#moderator-attention').live('toogle', function(){ function
Please help me out here because im getting kind of confused.. I have a
After getting a helpful answer here , I have run into yet another problem:
I am getting the following error here: http://mvcbense.azurewebsites.net/ Invalid object name 'dbo.BlogPosts'. This is
I am getting this error here is my code if(isset($_POST['submit'])) { $projTit=mysql_escape_string($_POST['projecttitle']); $projCat=mysql_escape_string($_POST['projectcategory']); $budget=intval(mysql_escape_string($_POST['budget']));
I am getting this error on code that used to work. I have not
I'm getting the error [ORA-01427: single-row subquery returns more than one row] when I
I'm getting very frustrated and I'm hoping someone here can help. I have a
Right now I have simple form with a single input. I'm trying to use
Here's what I'm trying to accomplish. I need to have a single CSV with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.