早教吧 育儿知识 作业答案 考试题库 百科 知识分享

针对这条语句查表时很慢,怎么才能快一些$orderdetail['yk']=$db->execute("selectsum(tbmoneychange.changemoneynum)asykfromtbmoneychangewheretbmoneychange.ordernoin(selecttbmoneychange.ordernofromtbmoneychangewheretbmo

题目详情
针对这条语句查表时很慢,怎么才能快一些
$orderdetail['yk']=$db->execute("select sum(tb_moneychange.changemoneynum) as yk from tb_moneychange where tb_moneychange.orderno in (select tb_moneychange.orderno from tb_moneychange where tb_moneychange.id in(select tb_play.tb_moneychangeid from tb_play where tb_play.playtimeID=$orderdetail[playtimeID] and tb_play.userid=".$userid."))")->fields['yk'];

▼优质解答
答案和解析
你的数据库是什么数据库?