Jump to content

[SOLVED] mysql selection problem


mforan

Recommended Posts

$query = "SELECT username,alliance,reports,repip,lastip FROM users WHERE reports >0 ORDER BY username ASC";
$result = mysql_query($query) or die("Error: ".mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_NUM)) { $pow2[] = $row; }

 

^^^ i want to run the above mysql, but i also want to select "lastip" if the report isnt over 0, but the lastip also exsists on one of the selected ones.

 

so i want to select these 2 because 1 contains 4 or >0:

 

112 0

112 4

(the above code would only select "112 4")

 

any ideas peeps?

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