如:ui
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date, (year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date,<![CDATA[(year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age]]>,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})
附:XML轉義字符spa
<code |
<xml |
小於號io |
>table |
|
大於號date |
&select |
&方法 |
和 |
' |
’ |
單引號 |
" |
" |
雙引號 |
由於這個是xml格式的,因此不容許出現相似「>」這樣的字符,可是均可以使用<![CDATA[ ]]>符號進行說明,將此類符號不進行解析。
select phone, user_head, nickname, real_name, certificate_type, certificate_number, email, birthday_date,<![CDATA[(year(now())-year(birthday_date)-1) + (DATE_FORMAT(birthday_date, '%m%d') <= DATE_FORMAT(now(),'%m%d')) as age]]>,heigth, weight, profession from yxs_user_info where user_uuid = (select uuid from yxs_user_login_info from uuid2=#{uuid2})