|
Posted by Jerry Stuckle on 01/25/07 05:27
zek2005 wrote:
> I am doing the following statement to retrieve results:
>
> $response = mysql_query("select * from preguntas where tema=$tema",
> $db);
> $row = mysql_fetch_array($response);
This fetches the first row
> while($row = mysql_fetch_array($response))
This fetches the second (and subsequent) rows, throwing away the results
of the first (and previous) rows.
> {
> echo('<font face="Tahoma" size="2">');
> echo('<p align="left">');
> echo($f .'- <a href="respuestas.php?id='. $row[id]. '">'
> .$row[pregunta]. '</a>');
> $f++;
> }
>
> I receive 2 items as a result. But if I check inside the DB, the result
> should be 3 items....I am loosing the first record.
>
> Any ideas about what could be wrong?
>
> Regards,
>
> Ezequiel
>
Get rid of the first
$row = mysql_fetch_array($response);
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|