Fw: Retrieving records

From: Date: Wed, 03 Aug 2005 02:07:41 +0000
Subject: Fw: Retrieving records
Groups: php.windows 
Request: Send a blank email to php-windows+get-1476@lists.php.net to get a copy of this message
> > Hi everyone; > > Please help me !!!! > > I'm trying to output data from a table in my database, I've used the php > > code as you can see below. But supose the table has 50 records, the code > > above only retrieve 49 records. > > > > what I'm doing wrong??? Can you help me??? > > > > Thank's a lot !! > > > > Danilo Meles > > > > <? > > mysql_pconnect("host","user","password") > > or die("Unable to connect to SQL server"); > > mysql_select_db("pesquisa") or die("Unable to select database"); > > $query="Select * from coleta order by id asc"; > > $dados = mysql_query($query) or die("Select Failed!"); > > $resp = mysql_fetch_array($dados); > > ?> > > > > <? > > while($resp = mysql_fetch_array($dados)){ > > ?> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > > > <html> > > <head> > > <title>Untitled</title> > > </head> > > > > <body bgcolor="White" leftmargin=0 topmargin=0> > > <table cellspacing="2" cellpadding="2" border="0"> > > <tr> > > <td><?echo $resp[pergunta];?></td> > > <td><a href="link.php?id=<?echo > > $resp[id];?>">Responder?</a></td> > > </tr> > > </table> > > </body> > > </html> > > <?}?>

« previous php.windows (#1476) next »