Jump to content

table


rashmi_k28

Recommended Posts

I have a code and I have to display the each table separately depending on the date.

 

Suppose I have 3 dates,

 

The records of each date should be displayed in separate table. Please tell me how to do it.

 

while($result = mysql_fetch_array($row))
{

$sql_ip="select ip from `table_name` where head_node='".$res[0]."'";
        $sql_ip1=mysql_query($sql_ip);
while($ip=mysql_fetch_array($sql_ip1)){

    $currentStatus = $result['status'];
    $currentTime = $result['timestamp'];
    $previousStatus = $previousStatus == '' ? $currentStatus : $previousStatus;
    $previoustime = $previoustime == '' ? $currentTime : $previoustime;

    if($previousStatus <> $currentStatus)
    {
        $d = strtotime($currentTime) - strtotime($previoustime);
        array_push($records,"$result[2]#$ip[0]#$result[2]#$previoustime#$result[1]#$d");

        }
    $previousStatus = $currentStatus;
}
}
}
}

echo "<html>";
echo "head>";

......

<table>.....


Link to comment
https://forums.phpfreaks.com/topic/98761-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.