rootnik
02-27-2006, 03:20 AM
The first query is the most important one. I'm only using the 2nd query to get a count...
SELECT u.username, u.lastactivity, f.field5, f.field14, f.field15, f.field16, f.field17, f.field19, f.userid
FROM user u
INNER JOIN userfield f
ON u.userid=f.userid
WHERE f.field16 = 'Yes' AND f.field19 > 0
ORDER BY u.lastactivity DESC;
Now I want to get a count of all members who has field19 set as greater than 0. It does not what the value of field16 is in the query below:
$ingame = mysql_result($TheTopQuery, 0, 7);
$custom = $db->query_read("
SELECT field19 FROM userfield
WHERE userfield.field19 = $ingame
ORDER BY userid DESC;
");
SELECT u.username, u.lastactivity, f.field5, f.field14, f.field15, f.field16, f.field17, f.field19, f.userid
FROM user u
INNER JOIN userfield f
ON u.userid=f.userid
WHERE f.field16 = 'Yes' AND f.field19 > 0
ORDER BY u.lastactivity DESC;
Now I want to get a count of all members who has field19 set as greater than 0. It does not what the value of field16 is in the query below:
$ingame = mysql_result($TheTopQuery, 0, 7);
$custom = $db->query_read("
SELECT field19 FROM userfield
WHERE userfield.field19 = $ingame
ORDER BY userid DESC;
");