LJ::get_keyword_id

LJ::get_keyword_id — Get the id for a keyword.

Use

LJ::get_keyword_id(uuid, keyword, autovivify);

Arguments

  • uuid. User object or userid to use. Pass this only if you want to use the userkeywords clustered table! If you do not pass user information, the keywords table on the global will be used.

  • keyword. A string keyword to get the id of.

  • autovivify. If present and 1, automatically create keyword. If present and 0, do not automatically create the keyword. If not present, default behavior is the old style -- yes, do automatically create the keyword.

Source:

cgi-bin/ljlib.pl

Returns:

Returns a kwid into keywords or userkeywords, depending on if you passed a user or not. If the keyword doesn't exist, it is automatically created for you.