homepage Welcome to WebmasterWorld Guest from 107.22.78.233
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Error Message from MySQL
Gian04




msg:4497828
 2:21 pm on Sep 20, 2012 (gmt 0)

What is the problem with this


SELECT itemmaster_list.*, category_lists.cid as categoryID, category_lists.displayed_text as categoryName, brand_lists.cid as brandID, brand_lists.displayed_text as brandName, brand_lists.image1 as brandImage, brand_lists.cid_text as brandTextCode,
CASE WHEN items_specialprices.itemprice IS NULL
THEN itemmaster_list.default_price
ELSE items_specialprices.itemprice
END as finalprice
FROM itemmaster_list, category_lists, brand_lists
LEFT JOIN items_specialprices ON items_specialprices.itemcode = itemmaster_list.cid
AND items_specialprices.username = 'UserS'
WHERE itemmaster_list.status = 'ACTIVE' AND itemmaster_list.cid = '99' AND category_lists.cid = itemmaster_list.categorycode AND brand_lists.cid = itemmaster_list.brandcode


Im getting an error "#1054 - Unknown column 'itemmaster_list.cid' in 'on clause'" but im sure field 'cid' exist in table 'itemmaster_list'

 

Gian04




msg:4497883
 4:12 pm on Sep 20, 2012 (gmt 0)

Problem Solved using LEFT JOIN

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved