Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-03-2008, 12:35 PM   PM User | #1
anilphp
New to the CF scene

 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
anilphp is an unknown quantity at this point
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'
anilphp is offline   Reply With Quote
Old 06-03-2008, 02:43 PM   PM User | #2
shahamitj
New to the CF scene

 
Join Date: May 2008
Location: Ahmedabad
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
shahamitj is an unknown quantity at this point
Please provide schema of all tables.
shahamitj is offline   Reply With Quote
Old 06-03-2008, 03:09 PM   PM User | #3
NancyJ
Senior Coder

 
NancyJ's Avatar
 
Join Date: Feb 2005
Location: Bradford, UK
Posts: 3,162
Thanks: 19
Thanked 65 Times in 64 Posts
NancyJ will become famous soon enough
I'm not sure how the error message could be more clear.
__________________
http://www.hazelryan.co.uk
NancyJ is offline   Reply With Quote
Old 06-03-2008, 03:19 PM   PM User | #4
byuhobbes85
Regular Coder

 
byuhobbes85's Avatar
 
Join Date: Oct 2006
Location: Ames, Iowa, USA
Posts: 116
Thanks: 9
Thanked 4 Times in 4 Posts
byuhobbes85 is an unknown quantity at this point
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>
byuhobbes85 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:41 PM.


Advertisement
Log in to turn off these ads.