// Begining of January
$ob = MysqL_query(" SELECT SUM(salary_amount) AS total FROM teacherexpense WHERE month(disburse_date)='01' AND year(disburse_date)='$year' ");
$nt = MysqL_fetch_assoc($ob);
$salaryamount= $nt['total'];
$ob = MysqL_query(" SELECT SUM(other_expense_amount) AS expenseamount FROM otherexpense WHERE month(other_expense_date)='01' AND year(other_expense_date)='$year' ");
$nt = MysqL_fetch_assoc($ob);
$expenseamount= $nt['expenseamount'];
$jk = MysqL_query(" SELECT SUM(amountpaid) AS revenue FROM studentpayment1 WHERE month(received_date)='01' AND year(received_date)='$year' ");
$t = MysqL_fetch_assoc($jk);
$revenue= $t['revenue'];
$ob = MysqL_query(" SELECT SUM(other_earning_amount) AS otherearningamount FROM otherearning WHERE month(other_earning_date)='01' AND year(other_earning_date)='$year' ");
$nt = MysqL_fetch_assoc($ob);
$otherearningamount= $nt['otherearningamount'];
$January= ($revenue+$otherearningamount)-($salaryamount+$expenseamount);
// End of January
解决方法:
将其填充到存储过程中?
PHP的数据库驱动程序不允许您运行多个以;分隔的查询.出于安全原因.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。