<!–查询单个记录作为相册封面–>
<select id=”GetPhotoAsAlbumFace” parameterClass=”System.Collections.Hashtable” resultMap=”PhotosMap”>
<![CDATA[SELECT top 1 *
FROM Photo_PhotoInfo
WHERE createtime>=#CreateShortDate#
AND createtime<dateadd(DAY,1,#CreateShortDate#)
AND AlbumID =#AlbumID#
ORDER BY createtime DESC]]>
</select> (ok!)
<!–查询单个记录作为相册封面–>
<select id=”GetPhotoAsAlbumFace” parameterMap=”pm_GetHistoryPhotosList” resultMap=”PhotosMap”>
<![CDATA[SELECT top 1 *
FROM Photo_PhotoInfo
WHERE createtime>=#CreateShortDate#
AND createtime<dateadd(DAY,1,#CreateShortDate#)
AND AlbumID =#AlbumID#
ORDER BY createtime DESC]]>
</select> (failed! )
<select id=”GetPhotoAsAlbumFace” parameterMap=”pm_GetHistoryPhotosList” resultMap=”PhotosMap”>
<![CDATA[SELECT top 1 *
FROM Photo_PhotoInfo
WHERE createtime>=?
AND createtime<dateadd(DAY,1,?)
AND AlbumID =?
ORDER BY createtime DESC]]>
</select> (failed! 一个参数在多个地方使用,问号只是按照parameterMap的属性定义先后来调用)
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/37995.html