Search and joined table of the same kind error
Hello Community
Im making a new CMS and this time im allowing categories and pages to have parents of them self due to multilingual, i used datassist to create the insert update results etc..., i had to change the query because it was not working due to the join been the same table, for example the main language is English after inserting i have an extra button to insert the same page translated to Spanish, this will add a new page and it has a column for the parents id example of the query:
SELECT
abc_article_cat.*,
tabla2.id AS cat2,
tabla2.Name AS name2,
tabla2.Parent_id AS parentid2,
tabla2.Alias AS alias2,
tabla2.Thumbnail AS thumb2
FROM abc_article_cat
LEFT OUTER JOIN abc_article_cat tabla2
ON abc_article_cat.Parent_id = tabla2.id
The data displays correct until i try to use the search im getting this message it changes depending on the field but its basically the same msg: Column 'Lang' in where clause is ambiguous, is there any way around to get the search working when using a join on the same table, i also notice even that the original query has an alias for the names, inside the search wizard it doesn't show that just grabs the table twice?