Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP/MySQL] How to show all mysql output in php?

Experienced Elementalist
Joined
Sep 10, 2006
Messages
213
Reaction score
1
how to show all mysql table output?
ex.:
$query=mysql("select name from account where score='9'");

i want ouput who have score 9 :

peter
jack
teddy

anybody know how? help please?
 
Junior Spellweaver
Joined
Dec 2, 2006
Messages
198
Reaction score
0
Re: Help, how to show all mysql output in php?

PHP:
while(mysql_query("select NAME from ACCOUNT where SCORE='9'")) {
echo
}
something like that. i forget all the needed info, but thats the basic.
 
Newbie Spellweaver
Joined
May 18, 2005
Messages
41
Reaction score
0
Re: Help, how to show all mysql output in php?

That's not going to work. mysql_query() only returns a resource.

PHP:
 $query = mysql_query("SELECT name FROM account WHERE score = 9");

 while ($data = mysql_fetch_array($query))
	{
	echo $data['name'] . "<br />";
	}
 
Back
Top