Jump to content

Loop question


gj0519

Recommended Posts

I currently have a script that I use a while loop to get my data.  What I am trying to figure out is a way to eliminate any records that are duplicates, like if 2 dates are the same to only show 1.

I have attached a png of what my output currently looks like.

Here is what my code is so far.

$message="";
while($list=mysqli_fetch_array($result)) {
   $date=$list['gm_date'];
   $time=$list['gm_time'];
   $gid=$list['gameid'];
   $fldname=$list['fld_name'];
   $tname=$list['team_name'];
   $rlname=$list['ref_lname'];
    $message.="<tr>
	<td>$date</td>
	<td>$time</td>
	<td>$gid</td>
	<td>$fldname</td>
	<td>$tname</td>
	<td>$rlname</td>
     </tr>";

Thanks,

GJ

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/155266-loop-question/
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.