查询报错求指教
return (Long)super.getHibernateTemplate().find("select count(*) from Xinwen where l_id="+byId).get(0);2012/03/14-22:51:01 ERROR PARSER:33 - line 1:8: unexpected token: *
byId 整型 --------------------编程问答-------------------- "select count(s1) from Xinwen s1 where s1.l_id="+byId --------------------编程问答-------------------- "select count(*) from Xinwen where l_id="+byId
需不需要加上引号
"select count(*) from Xinwen where l_id='"+byId+"'" --------------------编程问答-------------------- byId什么类型
补充:Java , Java EE