PDA

View Full Version : globalization


SmEdD
08-11-2003, 11:09 PM
Ok how do I get the rank level to go up in the rank query.

$ranks = $DB_site->query("
SELECT *
FROM clan_rank
WHERE ranklevel = $ranklevel
");

$rankinfo = array();
while ($rank = $DB_site->fetch_array($ranks))
{
$rankinfo[] = $rank;
}

$members = $DB_site->query("
SELECT *
FROM clan_roster
ORDER BY rank, name");

while ($memberinfo = $DB_site->fetch_array($members))
{

$ranklevel = $rankinfo["$memberinfo[rank]"];
$rank = $rankinfo['rank'];

SmEdD
08-12-2003, 03:53 AM
Ok I got it after fiddeling with it for about 2 hours :(

Here is the code if any one is intrested

$members = $DB_site->query("
SELECT *
FROM clan_roster
ORDER BY rank, name");

$ranklevel = $DB_site->fetch_array($members);
$rankid = $ranklevel['rank'];

$ranks = $DB_site->query("
SELECT *
FROM clan_rank
WHERE ranklevel = $rankid
");

$ranktitle = $DB_site->fetch_array($ranks);

while ($memberinfo = $DB_site->fetch_array($members))
{

$rank = $ranktitle['rank'];

EDIT: Found a bug in the old one and currently running and extra query to fix. If anyone knows how to fix this it would be appreciated.

$rankids = $DB_site->query_first("
SELECT *
FROM clan_roster
ORDER BY rank, name");

$rankid = $rankids['rank'];

$ranks = $DB_site->query("
SELECT *
FROM clan_rank
WHERE ranklevel = $rankid
");

$ranktitle = $DB_site->fetch_array($ranks);

$members = $DB_site->query("
SELECT *
FROM clan_roster
ORDER BY rank, name");

while ($memberinfo = $DB_site->fetch_array($members))
{

$rank = $ranktitle['rank'];