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?
Printable View
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?
something like that. i forget all the needed info, but thats the basic.PHP Code:while(mysql_query("select NAME from ACCOUNT where SCORE='9'")) {
echo
}
That's not going to work. mysql_query() only returns a resource.
PHP Code:$query = mysql_query("SELECT name FROM account WHERE score = 9");
while ($data = mysql_fetch_array($query))
{
echo $data['name'] . "<br />";
}
wow, it's work, thank's for help....