Jump to content



Latest News: (loading..)

- - - - -

1066 - Not unique table/alias: 'p'


  • Please log in to reply
2 replies to this topic

#1   ce7

ce7
  • Members
  • 202 posts
  • Real Name:lyn

Posted 10 August 2012 - 12:57 AM

Hi

When I do search at the backend, I got the error message. I think maybe I have two products p,
but I dont know which files I should go to check, can anyboy please help?

Categories/Products  / search


1066 - Not unique table/alias: 'p'

select count(*) as total from products p, products_description pd, products_to_categories p2c , products p LEFT JOIN products_fields_groups_names pfgn on p.products_fields_group_id = pfgn.products_fields_group_id and pfgn.language_id = '1' where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and pd.products_name like '%072%'

thanks

#2   marrrecki

marrrecki
  • Members
  • 159 posts
  • Real Name:Marek
  • Gender:Male
  • Location:Poland

Posted 10 August 2012 - 03:27 AM

Your sql query should look like this:

select count(*) as total from (products p LEFT JOIN products_fields_groups_names pfgn on p.products_fields_group_id = pfgn.products_fields_group_id and pfgn.language_id = '1'), products_description pd, products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and pd.products_name like '%072%'

Need help? Please contact me:

#3   ce7

ce7
  • Members
  • 202 posts
  • Real Name:lyn

Posted 26 August 2012 - 12:43 PM

Hi Marek,

Thank you for replying my post. Can you please post again as I can not see your code.

And which file should I go to modify? admin/categories.php?