Help me to find out this sql error

Discussion in 'PHP' started by Subikar, Sep 9, 2007.

  1. #1
    SELECT count( DISTINCT p.products_id ) AS total
    FROM products p
    LEFT JOIN manufacturers m
    USING ( manufacturers_id ) , products_description pd
    LEFT JOIN specials s ON p.products_id = s.products_id, categories c, products_to_categories p2c
    WHERE p.products_status = '1'
    AND p.products_id = pd.products_id
    AND pd.language_id = '1'
    AND p.products_id = p2c.products_id
    AND p2c.categories_id = c.categories_id
    AND (
    (
    pd.products_name LIKE '%hjbhj%'
    OR p.products_model LIKE '%hjbhj%'
    OR m.manufacturers_name LIKE '%hjbhj%'
    )
    )

    MySQL said: Documentation
    #1054 - Unknown column 'p.products_id' in 'on clause'
     
    Subikar, Sep 9, 2007 IP
  2. abixalmon

    abixalmon Well-Known Member

    Messages:
    378
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    #2
    p.products_id could be misspelled!
     
    abixalmon, Sep 9, 2007 IP