$res="select * from update_record where ( code='.$dh.' or code='.$dh.PRE' ) and edition='.$m_max_bb.'";
自己手动拼接参数,不怕SQL
注入嘛
$res="select * from update_record where ( code='.$dh.' or code='.$dh.PRE' ) and edition='.$m_max_bb.' and (instr(edition,'13_')>0 or instr(edition,'12_')>0)";
@511,时间的加法如果在php中比较简单,
加一个月:strtotime("+1 months",strtotime('2022-09-05 18:28:23'))
加5天:strtotime("+5 days",strtotime('2022-09-05 18:28:23'))
加5年:strtotime("+5 year",strtotime('2022-09-05 18:28:23'))
你甚至可以:strtotime("+1 week 2 days 4 hours 2 seconds",strtotime('2022-09-05 18:28:23'))
得到结果后用:date('Y-m-d H:i:s',datetime)重新转为日期时间
比如:date('Y-m-d H:i:s',strtotime("+5 year",strtotime('2022-09-05 18:28:23')))
这样?
edition NOT LIKE '%13\_%'
edition NOT LIKE '13\_%'