Jump to content

PHP MYSQL Only returning 1 result?


Kez323

Recommended Posts

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'];

}

 

Link to comment
https://forums.phpfreaks.com/topic/281051-php-mysql-only-returning-1-result/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.