what database are you using? what datatype is for belong_to can you tryfrom [record] inner join [users] 
 on [record].[uid]=[users].[ID] where [record].[points]<>0 and [record].[belong_to]='"+small_class_id+"' order by [record].[ID] DESC"