Jump to content

First row of data is not showing up


simcoweb

Recommended Posts

On this page: [url=http://www.highlandbluffsresort.com/phase-two.php]http://www.highlandbluffsresort.com/phase-two.php[/url] the first item in the list of lots should be Lot #2. Instead it's showing Lot#3 as the first item. When I view the database in PHPMyAdmin it clearly shows lot #2 as the first row. I can't understand why it doesn't show in the posted results in the page. Here's the code:

[code]$sql=("SELECT * FROM phase_two");
$results=mysql_query($sql);
$row = mysql_fetch_row($results);
$num_rows = mysql_num_rows($results);
if ($num_rows == 0) {
echo "<font class='bodytext'><center>We are sorry. The lot information is unavailable at this time.<br /> Please contact us for details on available lots.<br />";
} else {

echo "
<table width='700' border='0' align='center' onMouseover=\"changeto(event, 'darkkhaki')\" onMouseout=\"changeback(event, 'lightgoldenrodyellow')\">
<tr>
<th><font face=\"Verdana\" size=\"2\">Lot #</th>
<th><font face=\"Verdana\" size=\"2\">Sq. Ft.</th>
<th><font face=\"Verdana\" size=\"2\">Street</th>
<th><font face=\"Verdana\" size=\"2\">Frontage</th>
<th><font face=\"Verdana\" size=\"2\">Location</th>
<th><font face=\"Verdana\" size=\"2\">View</th>
<th><font face=\"Verdana\" size=\"2\">Acres</th>
<th><font face=\"Verdana\" size=\"2\">Price</font></th>
<th><font face=\"Verdana\" size=\"2\">&nbsp;</th>
</tr>";
while ($a_row = mysql_fetch_array( $results )) {
echo "
<tr bgcolor=\"lightgoldenrodyellow\">
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['lot'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['sq_feet'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['street'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['frontage'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['location'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['view'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">" . $a_row['acres'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\">\$" . $a_row['sale_price'] . "</td>
<td style=\"text-align: center;\"><font face=\"Verdana\" size=\"1\"><a href=\"contact-p2.php?id=" . $a_row['lot'] . "\">Contact</a></td>
</tr>";
}

print "</table>\n";
echo "<br>";
}
//print "</table>\n";[/code]


I can't see anything here that would tell it to ignore row 1 of the table. Ideas?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.