I'm having a really weird problem with a query I am running, basically I am trying to query the database and return all the pricing records for particular ids.
I know there should be 52 records returned, and when I run the same SQL through phpmyadmin I get 52 records returned.
When I run the query through PHP with the same SQL, I only get 51 records (eh???).
There is obviously a small error in the code, but for the life in me I cannot see it:
<?php require_once('Connections/conVillas.php'); ?>
<?php
mysql_select_db($database_conVillas, $conVillas);
$sql = "SELECT * FROM pricing1 WHERE ID = '9'";
$result = mysql_query($sql, $conVillas) or die();
$row = mysql_fetch_array($result);
echo $sql;
$i = 1;
while($row = mysql_fetch_array($result)){
echo "<table>";
echo "<tr class=menublack>";
echo "<td>ID" .$row['price_id']. "</td>";
echo "<td>Week" .$i. "</td>";
echo "<td>" .$row['week']. "</td>";
echo "<td>" .$row['price']. "</td>";
echo "</table>";
$i++;
}
?>