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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:14:27+00:00 2026-06-09T03:14:27+00:00

i have problem with this code: $comments->query = SELECT . PREFIX . _comments.id, post_id,

  • 0

i have problem with this code:

$comments->query = "SELECT " . PREFIX . "_comments.id, post_id, " . PREFIX . "_comments.user_id, " . PREFIX . "_comments.date, " . PREFIX . "_comments.autor as gast_name, " . PREFIX . "_comments.email as gast_email, text, ip, is_register, name, " . USERPREFIX . "_users.email, news_num, " . USERPREFIX . "_users.comm_num, user_group, lastdate, reg_date, signature, foto, fullname, land, yahoo, " . USERPREFIX . "_users.xfields, " . PREFIX . "_post.title, " . PREFIX . "_post.date as newsdate, " . PREFIX . "_post.alt_name, " . PREFIX . "_post.category FROM " . PREFIX . "_comments LEFT JOIN " . PREFIX . "_post ON " . PREFIX . "_comments.post_id=" . PREFIX . "_post.id LEFT JOIN " . USERPREFIX . "_users ON " . PREFIX . "_comments.user_id=" . USERPREFIX . "_users.user_id " . $where . " ORDER BY id desc";

Error:

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 'ON dle_comments.post_id=dle_post.id LEFT JOIN dle_users ON dle_comments.user_id=' at line 1

Edit:

SELECT 
  dle_comments.id, post_id, 
  dle_comments.user_id, 
  dle_comments.date, 
  dle_comments.autor as gast_name, 
  dle_comments.email as gast_email, 
  text, ip, is_register, 
  group_concat(mid) as `awards`, 
  name, dle_users.email, news_num, 
  dle_users.comm_num, user_group, 
  lastdate, reg_date, signature, 
  foto, fullname, land, icq, 
  dle_users.xfields, dle_post.title, 
  dle_post.date as newsdate, dle_post.alt_name, dle_post.category 
FROM 
  dle_comments 
  LEFT JOIN dle_awards 
    ON uid = dle_post 
    ON dle_comments.post_id=dle_post.id 
  LEFT JOIN dle_users 
    ON dle_comments.user_id=dle_users.user_id 
ORDER BY id desc 
LIMIT 0,30

My SQL Version: 5.5.20

how i can fix this problem?

  • 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-09T03:14:29+00:00Added an answer on June 9, 2026 at 3:14 am

    You have an ON clause immediately following another ON clause. Based on the tables/columns specified in the second one, it looks like you are missing a JOIN to dle_post in there:

    -- existing:
    LEFT JOIN dle_awards ON uid = dle_post ON dle_comments.post_id=dle_post.id 
    -- becomes:
    LEFT JOIN dle_awards ON uid = dle_post LEFT JOIN dle_post ON dle_comments.post_id=dle_post.id 
    

    Of course, that probably needs tweaking since it doesn’t look like dle_post (in the first ON clause) is actually valid. I’d need to see the schema to know.

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

Sidebar

Related Questions

I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)
Hi i have problem with this code, i found it on the internet and
i am a beginner and i have a problem : this code doesnt compile
I have a problem in this code when I enter a string, instead of
I have a problem with this code: (The error is below the code) public
I have a problem with this code right here: - (void)fetchedData:(NSData *)responseData { //parse
I'm a beginner with jdbc ... I have a problem running this code :
I have a problem with this is code: Set oXmlHTTP = CreateObject(Microsoft.XMLHTTP) oXmlHTTP.Open POST,
I have a problem here with this code. I'm opening a socket, then listening
Im create this code to store page view in database, but i have problem

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.