can someone tell me what's wrong with this? the error is on line 26 but idk what is wrong. <?php if( !ereg("index.php", $_SERVER['PHP_SELF']) ) { header("Location: index.php"); die(); } if( isset($_POST['fetchrank']) ) { $query01 = odbc_exec($connection, " SELECT CLID FROM {$_CONFIG[ClanTable]}(nolock) WHERE DeleteFlag=0 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point Desc, Wins Desc, Losses Asc"); $rank = 0; while( odbc_fetch_row($query01) ) { $rank++; $clid = odbc_result($query01, 1); odbc_exec($connection, "UPDATE {$_CONFIG[ClanTable]} SET Ranking = $rank WHERE CLID = $clid"); } } { if( $clanname == "" || $type == "" || $id == "" ) { ("Create Clan"$_STR[Msg1]); die; } like isaID in my other post im kind of new at this. so if it's something really obvious please dont laugh at me.
Hi, Try this code. Works for me. <?php if(!ereg("index.php", $_SERVER['PHP_SELF']) ) { header("Location: index.php"); die(); } if( isset($_POST['fetchrank']) ) { $query01 = odbc_exec($connection, " SELECT CLID FROM {$_CONFIG[ClanTable]}(nolock) WHERE DeleteFlag=0 AND ((Wins != 0) OR (Losses != 0)) ORDER BY Point Desc, Wins Desc, Losses Asc"); $rank = 0; while( odbc_fetch_row($query01) ) { $rank++; $clid = odbc_result($query01, 1); odbc_exec($connection, "UPDATE {$_CONFIG[ClanTable]} SET Ranking = $rank WHERE CLID = $clid"); } } if( $clanname == "" || $type == "" || $id == "" ) { die("Create Clan".$_STR['Msg1']); } ?>
Hi, I am not sure what you are trying to do with the code. Let me know if I can be of any more help to you.