Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help me to solve this query problem in mysql5

    Code:

    select pd.products_name, p.products_model, p.products_image,
    p.products_id, p.products_fee,
    p.products_gv, p.manufacturers_id,
    p.products_price, p.products_weight, pd.products_fee_description,
    p.products_price1, p.products_price2, p.products_price3,
    p.products_price4, p.products_price5,
    p.products_price6, p.products_price7,
    p.products_price8, p.products_price1_qty, p.products_price2_qty,
    p.products_price3_qty, p.products_price4_qty,
    p.products_price5_qty, p.products_price6_qty,
    p.products_price7_qty, p.products_price8_qty,
    p.products_qty_blocks, p.products_tax_class_id,
    IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,
    IF(s.status, s.specials_new_products_price, p.products_price) as final_price
    from ( products_description pd, products p )
    left join manufacturers m
    on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c
    left join specials s
    on p.products_id = s.products_id
    where p.products_status = '1' and
    p.products_id = '69174' and
    pd.products_id = '69174' and
    pd.language_id = '1'

    Quote:
    1054 - Unknown column 'p.products_id' in 'on clause'

  • #2
    New to the CF scene
    Join Date
    May 2008
    Location
    Ahmedabad
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please provide schema of all tables.

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    I'm not sure how the error message could be more clear.

  • #4
    Regular Coder byuhobbes85's Avatar
    Join Date
    Oct 2006
    Location
    Ames, Iowa, USA
    Posts
    116
    Thanks
    9
    Thanked 4 Times in 4 Posts
    The error means that the table products does not have a field named products_id. Some possible explanations:

    - perhaps there is a misspelling...maybe it's product_id
    - perhaps you are referring to the wrong table...you should really look at your database schemas and make sure you're querying for what you really want
    -- </byuhobbes>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •