problem during data fetch
- by nectar
here is my code
$sql="SELECT * FROM $tbl_name WHERE ownerId='$UserId'";
$result=mysql_query($sql,$link)or die(mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
<?php
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "<tr>";
echo "<td>".$row['pinId']."</td>";
echo "<td>".$row['usedby']."</td>";
echo "<td>".$row['status']."</td>";
echo "</tr>";
}
?>
it is ignoring the first record means if 4 rows are in $row its ignoring the 1st one rest three are coming on page. ownerId is not primary key.