SELECTm.content,o.order_price,o.id,m.idFROMscp_home_msg mINNER JOIN scp_order o ON m.link_id=o.id
把content 里面的金额换成order_price
1、获取金额
SELECT substring_index(content,‘实付¥‘,-1) FROM scp_home_msg WHERE id=1096;--1000.00"}
2、获取最后两个字符
SELECT right(substring_index(content,‘实付¥‘,-1),2) FROM scp_home_msg WHERE id=1096;--"}
3、获取完整金额
SELECT substring_index(substring_index(content,‘实付¥‘,-1),right(substring_index(content,‘实付¥‘,-1),2),1) FROM scp_home_msg WHERE id=1096;--1000.00
4、得到结果
SELECT substring_index(substring_index(content,‘实付¥‘,-1),right(substring_index(content,‘实付¥‘,-1),2),1) jieGuo,
m.content content,o.order_price orderPrice,o.id orderId,m.id mIdFROMscp_hom