$a = dbquery("SELECT x_narys FROM ".$db_prefix."xx"); $b = dbarray($a); $aa = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".$b['x_narys']."'"); $bb = dbarray($aa); echo $bb['user_name'];