|
|
|
รบกวนทุกท่านอีกครั้งแล้วครับ ขอไอเดีย หรือหลักการแสดงข้อมูลหน่อยครับ |
|
|
|
|
|
|
|
Code (PHP)
<?
$d='1';
$m=$_REQUEST['Rmonth'];
$y=$_REQUEST['Ryear'];
// $m=8; $y=2010 ;
$num_days =cal_days_in_month(CAL_GREGORIAN,$m,$y);
while($d<=$num_days){
$alleid='';
$d=str_pad($d,2,"0",str_pad_left) ;
$report1="$d/$m/$y";
$sql="select * from loglibrary where daystart='$report1' ";
$result=mysql_query($sql) ;
$numrow=mysql_num_rows($result);
for ($log=0; $log<$numrow ; $log++){
$fetche=mysql_fetch_array($result);
$dbuserid1=$fetche['userid'];
$dbday=$fetche['daystart'] ;
$alleid[]=$dbuserid1;
// echo "$dbday - $dbuserid1<br>" ;
}
?>
<td align="center" valign="middle"><?
echo displaydate($report1)."<br>";
?></td>
<?
$sqlh= "select * from typeuser order by id";
$resulth=mysql_query($sqlh);
$numrowsh=mysql_num_rows($resulth);
while($fetchh=mysql_fetch_array($resulth)){
$typeid1=$fetchh['id'];
$typename1=$fetchh['typename'];
for ($i=0; $i<$log; $i++) {
$sqleidt="select * from user WHERE userid=$alleid[$i] AND type=$typeid1";
$resulteidt=mysql_query($sqleidt) ;
$numroweidt=mysql_num_rows($resulteidt);
// for ($eidt=0; $eidt<$numroweidt ; $eidt++){
while($fetcheid=mysql_fetch_array($resulteidt)){
//$fetcheid=mysql_fetch_array($resulteidt);
$dbid=$fetcheid['id'];
$dbuser=$fetcheid['userid'];
$dbtype=$fetcheid['type'];
$db2sex=$fetcheid['sex'];
// echo $dbuser."---".$report1."<br>" ;
if (!empty($dbuser)){ $typesa++ ; } else{ $typesa=0;}
// if ($dbuser!=''){ $typesa++ ; }
}
}
if( $typesa==0) { $typesa='-' ;}
?>
<td align="center" valign="middle"><? echo $typesa."<br>" ; $typesa=0; ?> </td>
<? }
?></tr>
<?
$d++ ;} ?>
|
|
|
|
|
Date :
2010-08-21 16:33:25 |
By :
libservice |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
line 192 มันอยู่ตรงไหนละครับ
|
|
|
|
|
Date :
2010-08-21 17:18:15 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|