rashmi_k28 Posted March 31, 2008 Share Posted March 31, 2008 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 More sharing options...
rashmi_k28 Posted March 31, 2008 Author Share Posted March 31, 2008 hi, please help me with this... I have to divide the table based on table. In the above code I am getting all the values in one table Link to comment https://forums.phpfreaks.com/topic/98761-table/#findComment-505501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.