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 9285967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:17:57+00:00 2026-06-18T19:17:57+00:00

I had this query DELETE c FROM review_comments AS c LEFT JOIN users AS

  • 0

I had this query

DELETE c FROM review_comments AS c 
LEFT JOIN users AS u 
ON u.user_id = c.user_id
WHERE c.comment = '{$comment}'
AND u.username = '{$user}'
LIMIT 1;

It did not work until I removed LIMIT 1;

It said: 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 'LIMIT 1' at line 6

Is this the incorrect usage of LIMIT 1 in this instance? I had a same query without joining tables and LIMIT 1 worked fine?

  • 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-18T19:17:59+00:00Added an answer on June 18, 2026 at 7:17 pm

    I don’t think LIMIT can be used with multi-table referenced DELETE statements in MySQL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to delete from database result of this query? can you guys help me
I had this error when I browse new web site that site sub from
I know this might be redundant but I have had the same query running
I had this function that deleted historical data that was no longer needed from
I have never had this happen before. The query is very simple by the
By taking reference from here I had made the following query: SELECT INSTITUTE.ID INST_ID,
I wanted to delete some records which i added recently, from this table mytemp,
Had this working; at one stage. The problem is the following text is now
I had this weird problem a little while ago and haven't been able to
I had this working at some point, as I had a question about this

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.