Welcome to WebmasterWorld Guest from 107.21.175.43

Forum Moderators: open

Message Too Old, No Replies

Error Message from MySQL

     

Gian04

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

5+ Year Member



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

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

5+ Year Member



Problem Solved using LEFT JOIN
 

Featured Threads

Hot Threads This Week

Hot Threads This Month