Hi 

try it without the first '$resp=mysql_fetch_array($dados);' in the first 
php-block!

there you actually fetch your first info. In the next php-block you simply 
overwrite it. --> then you only can process 49 records.

Give it a try :)
-Oliver




[EMAIL PROTECTED] (Danilo Meles) wrote in
news:009001c59733$7b2fe5b0$23cecac8@paraisonet: 

> 
> ----- Original Message ----- 
> From: "Danilo Meles" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 02, 2005 4:21 AM
> Subject: Retrieving records
> 
> 
>> Hi everyone;
>> 
>> I'm trying to retrieve data from a table inmy 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","root","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> <tr> <td></td> <td></td> </tr> <tr> <td></td> <td></td>
>>     </tr> </table> 
>> 
>> 
>> 
>> 
>> </body>
>> </html>
>> <?}?>
>> 
> 
> 


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to