errore sulla ricerca
Inviato: 15/11/2008, 21:01
Facendo la ricerca sul mio sito http://www.negonline.it genera il seguente errore:
1066 - Not unique table/alias: 'pd'
select count(distinct p.products_id) as total from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id) left join manufacturers m on m.manufacturers_id=p.manufacturers_id, products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_extra_fields pef, 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 = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and pef.products_extra_fields_id=p2pef.products_extra_fields_id and ((pd.products_name like '%olio%' or p.products_model like '%olio%' or m.manufacturers_name like '%olio%' or pef.products_extra_fields_name like '%olio%' or p2pef.products_extra_fields_value like '%olio%') )
C'è qualcuno che ne capisce di SQL che mi può aiutare ??
Ringrazio anticipatamente.
1066 - Not unique table/alias: 'pd'
select count(distinct p.products_id) as total from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id) left join manufacturers m on m.manufacturers_id=p.manufacturers_id, products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_extra_fields pef, 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 = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and pef.products_extra_fields_id=p2pef.products_extra_fields_id and ((pd.products_name like '%olio%' or p.products_model like '%olio%' or m.manufacturers_name like '%olio%' or pef.products_extra_fields_name like '%olio%' or p2pef.products_extra_fields_value like '%olio%') )
C'è qualcuno che ne capisce di SQL che mi può aiutare ??
Ringrazio anticipatamente.