Jump to content

Duplicating Records


artisticre

Recommended Posts

I have pasted my code below. Can someone please let me know why it is echoing the data twice?

 

<?php

 

 

 

$db = mysql_connect("xxx", "xxx", "xxx");

 

mysql_select_db("xxx",$db);

 

$result = mysql_query("SELECT * from coaching where title = '$TitleList'",$db);

 

 

 

 

 

if ($myrow = mysql_fetch_array($result)) {

 

do {

 

echo ("<table border=0 align=center width='90%'>

 

<tr>

<td> </td>

</tr>

<tr>

 

<td class=coachtitle>$myrow[1]</td>

</tr>

<tr>

<td class=coach>$myrow[2]</td>

</tr>

 

 

");

 

} while ($myrow = mysql_fetch_array($result));

 

echo ("</table>\n");

 

} else {

 

echo "<br><br><p align=center>There Are No Coaching At This Time!</p>";

echo "<br><br><p align=center>Check Back Soon!</p>";

}

 

 

 

?>

Link to comment
https://forums.phpfreaks.com/topic/77991-duplicating-records/
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.