select max(voteId) from voteInfo 这个查出来是没有列名的 需要指定一个列名 select max(voteId) as voteId from voteInfo
列名 voteId 无效说明voteInfo表中没有这个字段,语句没有错