Re: php+mysql simple query help me pls! ty.
| From: | Sharif Islam | Date: | Thu, 03 Jan 2002 20:06:37 +0000 |
| Subject: | Re: php+mysql simple query help me pls! ty. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15354@lists.php.net to get a copy of this message | ||
I think you need while loop here.
>
> $result = mysql_query("SELECT * FROM members",$db);
while ( $row =mysql_fetch_object($result))
{
>
> printf("ircname: %s<br>n", mysql_result($result,0,"ircname"));
> printf("email: %s<br>n", mysql_result($result,0,"email"));
> printf("realname: %s<br>n", mysql_result($result,0,"realname"));
> printf("asl: %s<br>n", mysql_result($result,0,"asl"));
> printf("info: %s<br>n", mysql_result($result,0,"info"));
>
}
> ?>
>
> </body>
> </html>
>
>
> # ERROR ############################################################
>
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /mnt/host-users/cavite/irc/members/t2.php on line 13
> ircname:
> n
> Warning: Supplied argument is not a valid MySQL result resource in
> /mnt/host-users/cavite/irc/members/t2.php on line 14
> email:
> n
> Warning: Supplied argument is not a valid MySQL result resource in
> /mnt/host-users/cavite/irc/members/t2.php on line 15
> realname:
> n
> Warning: Supplied argument is not a valid MySQL result resource in
> /mnt/host-users/cavite/irc/members/t2.php on line 16
> asl:
> n
> Warning: Supplied argument is not a valid MySQL result resource in
> /mnt/host-users/cavite/irc/members/t2.php on line 17
> info:
> n
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>