humbleprogrammer
Programmer
Hi,
I am new to PHP and am having trouble getting the record at row 0 to display in my query. All other rows display accept for row 0. Below is my code. Any help is GREATLY appreciated.
<?php
include("Connection.php"
;
$strQuery = "SELECT * FROM user_auctions WHERE user_id = ".$user_id."";
$row = mysql_query($strQuery) or die("Error".mysql_error());
if(mysql_num_rows($row)>0)
{
$rs=mysql_fetch_array($row);
while($rs = mysql_fetch_array($row)) {
$title="$rs[title]";
$date_added="$rs[date_added]";
$auction_id="$rs[auction_id]";
?>
<tr>
<td width="7%"><font size="2"><a href="modify_auction.php?auction_id=<?=$auction_id?>&type=View" target="_blank"><img src="Images/MagGlass.gif" width="20" height="23" border="0"></a></font></td>
<td width="7%"><a href="edit_auction.php?auction_id=<?=$auction_id?>" target="_blank"><img src="Images/updateColumn.gif" width="14" height="14" border="0"></a></td>
<td width="8%"><a href="view_auctions.php?Delete=Yes&auction_id=<?=$auction_id?>"><img src="Images/deleteColumn.gif" width="14" height="14" border="0"></a></td>
<td width="21%"> <font size="2">
<?=$date_added?>
</font></td>
<td width="57%"> <font size="2">
<?=$title?>
</font></td>
</tr>
<?php
}
}
else
{
echo "No auctions found!";
}
ob_end_flush();
?>
I am new to PHP and am having trouble getting the record at row 0 to display in my query. All other rows display accept for row 0. Below is my code. Any help is GREATLY appreciated.
<?php
include("Connection.php"
$strQuery = "SELECT * FROM user_auctions WHERE user_id = ".$user_id."";
$row = mysql_query($strQuery) or die("Error".mysql_error());
if(mysql_num_rows($row)>0)
{
$rs=mysql_fetch_array($row);
while($rs = mysql_fetch_array($row)) {
$title="$rs[title]";
$date_added="$rs[date_added]";
$auction_id="$rs[auction_id]";
?>
<tr>
<td width="7%"><font size="2"><a href="modify_auction.php?auction_id=<?=$auction_id?>&type=View" target="_blank"><img src="Images/MagGlass.gif" width="20" height="23" border="0"></a></font></td>
<td width="7%"><a href="edit_auction.php?auction_id=<?=$auction_id?>" target="_blank"><img src="Images/updateColumn.gif" width="14" height="14" border="0"></a></td>
<td width="8%"><a href="view_auctions.php?Delete=Yes&auction_id=<?=$auction_id?>"><img src="Images/deleteColumn.gif" width="14" height="14" border="0"></a></td>
<td width="21%"> <font size="2">
<?=$date_added?>
</font></td>
<td width="57%"> <font size="2">
<?=$title?>
</font></td>
</tr>
<?php
}
}
else
{
echo "No auctions found!";
}
ob_end_flush();
?>