Jump to content

[SOLVED] while() & MySql problem


Michdd

Recommended Posts

I'm using this:

 

$result = mysql_query("SELECT * FROM middlemen ORDER BY name") 
or die(mysql_error());

while($row = mysql_fetch_array( $result )) {

$name = $row['name'];
$status = $row['status'];

while($status = "Middle Man") {

echo "<li>".$name."</li>";

}

}

 

Now, to test it I put 1 user in the database with the status: Middle Man. And it just repeated the name over and over. How would I make it so that it only each name, once?

Link to comment
https://forums.phpfreaks.com/topic/129332-solved-while-mysql-problem/
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.