BlindingLight Posted October 24, 2008 Posted October 24, 2008 (edited) Hello Everybody! :( When I try to do a search I get the following error.... It looks like there is a conflict with the name o a table. I don't know much PHP and DB management but I get around a bit. From looking at the error.. what can you tell? Have any of you seen something like this? 1066 - Not unique table/alias: 'pd' 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, products_description pd, 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 '%b%' or p.products_model like '%b%' or m.manufacturers_name like '%b%') ) ANY HELP IS MUCH APPRECIATED? Edited October 24, 2008 by BlindingLight Quote
BlindingLight Posted October 24, 2008 Author Posted October 24, 2008 (edited) Nevermind.... just when you finally give up the answer pops up. I haven't solved the mystery but somehow I found a really old back up for that file which solved the problem... I will try to figure out what was wrong with it. THANKS ANYWAY! The problem was in this line in advanced_search.hp $from_str = "from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m using(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c"; Edited October 24, 2008 by BlindingLight Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.