SELECT t.id as id, t.name as name, t.showname as showname, t.classfile as classfile, t.classname as classname, t.misc as misc, t.editfile as editfile FROM bobject as b, otype as t WHERE b.id = 1 AND t.id = b.otype