mysql - mybatis query counts the number of a certain column, group query based on a column, how to receive in xml file
ringa_lee
ringa_lee 2017-06-15 09:21:18
0
1
1293

mybatis query counts the number of a certain column, group query based on a column, I don’t know how to write the resultType parameter in the xml file.

SQL statement:
select title_type,COUNT(title) from qa_title where title like '%车%' GROUP BY title_type;

xml:

<select id="getTitleCuntLike" resultType="cheng.secondprice.entitylet.QaContent" parameterType="String">

select title_type,COUNT(title) from qa_title  where title like '%${titles}%' GROUP BY title_type

</select>

I tried using the entity class to receive it, but it didn’t work. I would like to ask in this case, how to write the resultType parameter to receive the value

ringa_lee
ringa_lee

ringa_lee

reply all(1)
洪涛

Provide information about entity classes.

Tips: count(title) you have not mapped which variable of the corresponding entity class.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!