Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

PHP MYSQL Only returning 1 result?

$
0
0
hey, this should echo all of the results from the query, right? in the database there is more than 1 fields to echo, but it only echos 1, whats wrong with it?
 
 
 
$getid = mysql_query("SELECT * FROM $tbl_name WHERE userid='$id'", $connect);

$idresults= mysql_fetch_array($getid);

while($idresults= mysql_fetch_array($getid)){

echo $idresults['frienduserid'];

}

 


Viewing all articles
Browse latest Browse all 13200

Trending Articles