Missing a row in query
Posted: Fri Jan 02, 2004 3:36 pm
I have a query that says If I run a quey of number of rows in array) Num_rows is 3 but I am only seeing 2 rows of data (or generically one row less of data than there should be).
Here is an extract of the code...
Any ideas about getting the extra row of data???
Thanks
[Edit: Added PHP tags for eyecandy. --JAM]
Here is an extract of the code...
Code: Select all
// get results
$query = "select * from sffdatafeed where name like "%$trimmed%" order by name"; // EDIT HERE and specify your table and field names for the SQL query
$result = mysql_query($query) or die("Couldn't execute query");
$row = mysql_fetch_array($result);
// display what the person searched for
echo "<p>You searched for: "" . $var . ""</p>";
// begin to show results set
$count = 1 + $s ;
// now you can display the results returned
while ($row = mysql_fetch_array($result)) {
echo "<BR><BR><table width='481' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td><table width='481' height='20' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td height='18'><img src='images/t_top.gif' width='481' height='29'></td>
</tr>
</table>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='4' background='images/t_left.gif'> </td>
<td><table border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='168'><table border='0' align='center' cellpadding='0' cellspacing='1'>
<tr>
<td width='160'><p align='center'>
<img src=$row[Thumbnail] border=0 alt="$row[name]"></p></td>
.......Thanks
[Edit: Added PHP tags for eyecandy. --JAM]