As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.

Help:Expression table

From OmegaWiki
Jump to: navigation, search
Help:Index Database layout Expression table



Tracks all existing expressions, as well as expressions that have been deleted. A expression is a specific word (e.g. "word") in a specific language (e.g. "English").

+-----------------------+------------------+------+-----+---------+-------+
| Field                 | Type             | Null | Key | Default | Extra |
+-----------------------+------------------+------+-----+---------+-------+
| expression_id         | int(10) unsigned | NO   | MUL | NULL    |       | 
| spelling              | varchar(255)     | YES  |     | NULL    |       | 
| language_id           | int(10)          | NO   | MUL | 0       |       | 
| add_transaction_id    | int(11)          | NO   | MUL | NULL    |       | 
| remove_transaction_id | int(11)          | YES  | MUL | NULL    |       | 
+-----------------------+------------------+------+-----+---------+-------+

Fields[edit]

expression_id 
A number that identifies the expression
spelling 
A string corresponding to the word of that expression, e.g. "word".
language_id 
The language of that expression. See Language table.
add_transaction_id 
Indicates when and by who the expression was added. See Transactions table.
remove_transaction_id 
Indicates when and by who the expression was removed. NULL if the expression is still in use

Sample MySQL code[edit]

The following code will return all the valid (i.e. not removed) words in English (language_id=85):

select spelling

from uw_expression
where uw_expression.language_id = 85
and uw_expression.remove_transaction_id IS NULL;