You are here: Problem with while « PHP Programming Language « IT news, forums, messages
Problem with while

Posted by zek2005 on 01/25/07 03:04

I am doing the following statement to retrieve results:

$response = mysql_query("select * from preguntas where tema=$tema",
$db);
$row = mysql_fetch_array($response);
while($row = mysql_fetch_array($response))
{
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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация