I have a straightforward query on a straightforward table as …
$validity=”Y”;
$query=”SELECT * FROM employees WHERE office=’$asking’ AND validity=’$validity'”;
$result=mysql_query($query) or die(mysql_error());
$num=mysql_num_rows($result);
$row=mysql_fetch_array($result,MYSQL_ASSOC);
if($num>0){
while($row=mysql_fetch_array($result))
{
echo'<tr>
<td>’,$row[reference],’ ‘,$num,'</td>
</tr>’;}
I know there are three valid rows and $num confirms this but I am only getting the last two out following while($row=………….
If I change $row=mysql_fetch_array($result,MYSQL_ASSOC); to be
$row=mysql_fetch_row($result,MYSQL_ASSOC);
Then I get all three rows but they are accompanied by a WARNING as
Warning: Wrong parameter count for mysql_fetch_row() in /home/cauli/public_html/malcolm/delete-agentoffice2.php on line 84
Have to say its driving me …..
Help