Module:Grammar: Difference between revisions

209 bytes added ,  00:33, 31 July 2019
m
no edit summary
mNo edit summary
mNo edit summary
Line 58: Line 58:
      
      
     fields = field
     fields = field
     args = {
     if (string.find(field, "term", -4) ~= nil) then
    table = 'Genders'
    args = {where='Gender="' .. gender .. '" AND _pageName="Gender and Pronouns"', limit='1'}
    else
    table = 'Pronouns'
    args = {
         where='pronoun="' .. pronoun .. '" AND _pageName="Gender and Pronouns"',
         where='pronoun="' .. pronoun .. '" AND _pageName="Gender and Pronouns"',
         limit='1'
         limit='1'
     }
    }
     local result= cargo.query('Pronouns',fields,args)
     end
     local result= cargo.query(table,fields,args)
     if not next(result) then
     if not next(result) then
         return nil
         return nil