sqlmap-partner.xml 640 Bytes
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="partner">
    <select id="getPartner">
        SELECT * FROM tbl_partner ORDER BY `type`, create_time DESC
    </select>
    <insert id="setPartner">
        INSERT INTO tbl_partner(`name`, `type`, pic, url, description, create_time) VALUES(:name,:type,:pic, :url, :description, UNIX_TIMESTAMP())
    </insert>
    <update id="setPartnerById">
        UPDATE tbl_partner SET `name` = :name,`type`=:type, pic = :pic, description = :description,url = :url WHERE id = :id
    </update>
    <delete id="delPartner">
        DELETE FROM tbl_partner WHERE id = :id
    </delete>
</sqlMap>