WordPress database error: [Not unique table/alias
-
Hello, I did study SQL on Codeschool before I tried some plugins: WP-Optimize, Advanced Database Cleaner and even was thinking in start learning about Queries to solve this issue, as nobody showed here on WordPress to give any help. :\ Sad.
Was thinking in uploading WP-DBManager and did uploaded Query-monitor 2.11.4 Before doing anything else I updated WooCommerce and all the error run out. Funny is that I deactivated all plugins and understood the trouble was with WooCommerce, but I did not see any article explaining about or showing WooCommerce as a possible plugin to be fixed in cases like that, see those words: ‘visible’, ‘catalog’, ‘product’, ‘publish’.
Thanks to me, who is learning in the hard way as many.
P.S.: I see many people posts are not getting any help.
WordPress users must watch and help the beginners!!!
lfabioLong time no replies! Just found this today because I have the same or similar error on a project. The cause is implied in the error message, the same table is being joined twice. Or the same alias (for the table name) is used twice. It’s hard to read these long sql statements but if you suspect a certain table is duplicated, search the statement for it and find out where it’s being used. When you find a “double join” or duplicate join, figure out a solution. Can’t tell you exactly how to solve it, still researching myself, try this stack overflow: http://stackoverflow.com/questions/4267929/whats-the-best-way-to-join-on-the-same-table-twice
In my own project the reason for the double-join is because we have a system where we’re creating the query in a loop, and it creates an array of joins. In some cases, the joins are for the same table. We might be able to fix it with using a different alias… still researching.
Hope this helps, 9-months later hopefully you solved it already.
9-months later hopefully you solved it already.
@goldhat, This thread is not only 9 months old, but @lfabio has already marked this thread “resolved”!!
If you are looking for topics that could benefit from your help, try looking in https://ww.wp.xz.cn/support/view/no-replies
This thread is closed now
The topic ‘WordPress database error: [Not unique table/alias’ is closed to new replies.
(@lfabio)
9 years, 10 months ago
Hello,
I have gotten this error on a website I am working on.
I really don’t know where to start to solve it.
Thank you for your help and attention!
LFABIO