Hi,
In lots of elgg plugins I see queries like
JOIN elgg_metastrings n on n_table.name_id = n.id
JOIN elgg_metastrings v on n_table.value_id = v.id
JOIN elgg_metastrings msn on n_table.name_id = msn.id
So as far as I understand, "v" "n_table" "n" "msn" are temporary tables. But I don't quite understand what do they represent. Is there a list of temporary table names which are used in elgg and what do they represent?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- HarrisonHill@HarrisonHill
HarrisonHill - 0 likes
- Paweł Sroka@srokap
Paweł Sroka - 0 likes
You must log in to post replies.no they're not temporary tables, they're aliases - basically giving the table a temporary nickname so that for the rest of the query you can write 'n.id' instead of 'elgg_metastrings.id'. It makes things shorter and more readable.
Thank you very much!
But how to find out which aliase means which table? Is there a list or something like -
n = elgg_metastrings etc?
The name is defined when perfirming JOIN, there's no general rule - that means no definite list.
Try reviewing: http://dev.mysql.com/doc/refman/5.0/en/join.html