Why is WordPress a table name column name prefix?

I noticed that in a recent update, WordPress decided to change all of its column names to include a table name prefix. WHY?!

The wp_posts table now has a column called post_title, for example. It used to be just a title. I do not understand the reasons for this change. Must be one, huh?

I just don’t understand what the possible reason could be, since in SQL you can reference things like table.column. It was also very difficult to change the whole code.

+3
source share
2 answers

Perhaps to prevent confusion when creating joins with tables that have similar column names.

+2

, .

, :

SELECT p.title, s.title FROM wp_posts p JOIN site s ON (p.site_id = s.id);
0

Source: https://habr.com/ru/post/1718604/


All Articles