SELECT case when PQUANDAXIAO='满69元减30元' then 30
when PQUANDAXIAO='5元无条件券' then 5 else 0 end PQUANDAXIAO
FROM tablename
PHP:
str_replace('满69元减30元','30',str_replace('5元无条件券','5', $row['PQUANDAXIAO']))
select REVERSE(right(REVERSE(filename),length(filename)-LEAST(if(Locate('0',REVERSE(filename)) >0,Locate('0',REVERSE(filename)),999),
if(Locate('1',REVERSE(filename)) >0,Locate('1',REVERSE(filename)),999),
if(Locate('2',REVERSE(filename)) >0,Locate('2',REVERSE(filename)),999),
if(Locate('3',REVERSE(filename)) >0,Locate('3',REVERSE(filename)),999),
if(Locate('4',REVERSE(filename)) >0,Locate('4',REVERSE(filename)),999),
if(Locate('5',REVERSE(filename)) >0,Locate('5',REVERSE(filename)),999),
if(Locate('6',REVERSE(filename)) >0,Locate('6',REVERSE(filename)),999),
if(Locate('7',REVERSE(filename)) >0,Locate('7',REVERSE(filename)),999),
if(Locate('8',REVERSE(filename)) >0,Locate('8',REVERSE(filename)),999),
if(Locate('9',REVERSE(filename)) >0,Locate('9',REVERSE(filename)),999)
)+1)),filename
from homework
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)