as i said change your code you posted above into that:
PHP Code:
global $DB_site;
$rankagefetch=$DB_site->query("SELECT * FROM usertitle WHERE rankcat='$post[ranksetid]'");
$rankage=$DB_site->fetch_array($rankagefetch);
if($post[posts]>='$rankage[miniposts]') {
$tempposts=$rankage[miniposts];
}
$urrankfetch=$DB_site->query("SELECT * FROM usertitle WHERE rankcat='$post[ranksetid]' AND miniposts='$tempposts'");
$urrank=$DB_site->fetch_array($urrankfetch);
$post[usertitle]=$urrank[title];