MySQL Forums
Forum List  »  PHP

Re: SELECT not echoing single entries
Posted by: Slava Divxak
Date: July 28, 2005 12:58AM

Keith Mundrick wrote:

> if($result)
> {
> while($row = mysql_fetch_row($result))
> print_r($row);
> }
Are you use both loops? If yes - it will not work, because after first loop pointer is in the end of result
So you have to delete or comment my loop
> while ($row = mysql_fetch_array($result))
> {
> echo "<td>$row</td>";
Here, php will show nothing, because $row - is array
> }
So, I think, you problem is that you loos first record somewhere, another words, you call mysql_fetch_array one time somewhere, and pointer moved through one record, and when you try to display results, it begin from second record. MAy be it isn't right. Try to make two records in table with same names, and try to read there. We will see what's done :)

(Sorry - wright English is difficult for me)

Trust me! I'm the best! :)

Options: ReplyQuote


Subject
Written By
Posted
Re: SELECT not echoing single entries
July 28, 2005 12:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.