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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:17:29+00:00 2026-05-26T07:17:29+00:00

I am trying to run this query but doesn’t run SELECT ng.parent_id, ng.tab, ng.post_id,

  • 0

I am trying to run this query but doesn’t run

SELECT ng.parent_id, ng.tab, ng.post_id, ng.ORDER, ng.cluster_key, pd.id, pd.slug, pd.link_text, pd.parent
FROM `ecom_navigation` AS ng, `ecom_page_data` AS pd
WHERE ng.cluster_key = 'primary'
AND ng.tab = '0'
AND ng.parent_id = '1'pd.id = ng.post_id
ORDER BY ng.order

and getting 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 ‘pd.id = ng.post_id ORDER BY ng.order’ at line 1

i’ve tried `ng.order` and `ng`.`order` but still cant seem to get it to run.

Any help is much appreciated

  • 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-05-26T07:17:29+00:00Added an answer on May 26, 2026 at 7:17 am

    I think you’re just missing an and:

    AND ng.parent_id = '1'pd.id = ng.post_id
    

    should probably be:

    AND ng.parent_id = '1'
    AND pd.id = ng.post_id
    

    Or better, put the join condition in the join (and don’t quote your numbers unless they really are strings):

    SELECT ng.parent_id, ng.tab, ng.post_id, ng.ORDER, ng.cluster_key, pd.id, pd.slug, pd.link_text, pd.parent
    FROM `ecom_navigation` AS ng join `ecom_page_data` AS pd on ng.post_id = pd.id
    WHERE ng.cluster_key = 'primary'
    AND ng.tab = 0        -- Leave the quotes on if tab is a string
    AND ng.parent_id = 1  -- Leave the quotes on if parent_id is a string
    ORDER BY ng.order
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run a query through the ORM like this: SELECT * from
I am trying to run this update statement but informix doesn't allow me to.
I am trying to run this simple query however it doesn't even parse saying
I'm currently trying to run a LINQ query over a MS SQL database. This
Hey guys I am getting this exception when trying to run the query Column
I am trying to run this SQL from ASP.NET 2005 but am getting an
I'm trying to run a simple query with node-mysql like this: client.query(UPDATE mytable SET
I'm trying to run the following MySQL query: mysql> SELECT num.value, agro.mean, agro.dev ->
I am trying to run this dreadfully simple command in Bash java -cp nasa-top-secret.jar
I'm trying to run this code: let coins = [50, 25, 10, 5, 2,1]

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.