求助:使用php myadmin的db,每天更新,需要编辑php的网页把之前五个工作日数据调出,求高手帮忙。

来源:百度知道 编辑:UC知道 时间:2024/09/27 23:22:04
<?php
/* date & time*/
echo $todaydate = date("F j, Y (T, g:i a) ");

include("config.php");

function subpast7days($day)
{
include("config.php");

$today = date("m/d/Y");
$now=time();
$m=$day*24*60*60;
$diff=$now-$m;
$past7days=date("<br>m/d/Y",$diff);

$range_TAT = array("<=5",">5","");
$flag = array("Closed Within Target (TAT = 5)","Closed Exceed Target (TAT = 5)","Past 5 daysAll Closed RMA");
$description = array("3500","1200","6400","1430");

/*get the number*/
$count = count($range_TAT);
for ($j = 0;$j<$count;$j++)
{
/*put all query into array */
$query2[$j]="select salesorg, SU

/*print data/salesorg*/
$length = count($description);
for($i = 0; $i < $length; $i++)
{
echo "<tr>";
echo "<td><CENTER><a>"."$description[$i]</a></CENTER></td>";
$mylength = count($flag);

for ($a=0;$a<$mylength;$a++)
{
$query = $query2[$a]." and salesorg=

'$description[$i]' //会不会是这里的原因,我也遇见过这种错误提示,可是忘了当时怎么改过来的了,真后悔没记录下来。

GROUP BY salesorg";
$myresult = mysql_query($query,$conn);
echo mysql_error($conn);
$quantity = mysql_fetch_array($myresult,MYSQL_NUM);