I've finally got up a system (tkx again to those who helped last time) and I've got another problem, this time in the output page. I'm trying to output details into a table from two different tables, the zonename and rank from one, and the email and status from another - which has an identical zonename to compare, I'm ordering from the table with rank by a field called position.
The code was along these lines... (missing out the HTML bits)
$broster = mysql_query("SELECT * FROM xvtxwaroster ORDER BY position DESC",$db);
$aroster = mysql_query("SELECT zonename,showemail,status FROM roster",$db);
do
{
printf ("<tr><td>%s%s</td><td align=center>%s</td><td align=center>%s</td><td align=center>%s</td></tr>\n",
$otherrow ["tag"], $myrow["zonename"], $myrow["rank"], $otherrow["showemail"], $otherrow["status"]);
$zonename = $myrow["zonename"];
}
while (
($myrow = mysql_fetch_array($broster))
&&
($otherrow = mysql_fetch_array($aroster))
);
Now, that kinda works, it outputs it, but if I then change the position, it misaligns it all and suddenly Joe has Bobs email for example, so I tried to change it like this...
$aroster = mysql_query("SELECT zonename,showemail,status FROM roster WHERE zonename='$zonename'",$db);
and then the do part also had...
$zonename = $myrow["zonename"];
so that whichever one was selected would be used in the query so that both were talking about the same thing and so it would all be ordered correctly.
I can do this from one table, but it means that it would grow another 10-15 rows, and thats just at the moment, further expansions would cause it to grow even further and I'd rather have it reading from a 20 row and a 5 row table each time than from a 60 row table for obvious speed reasons!
Thanks for any help, I hope thats clear.
(I have looked on www.php.net and had a few problems with that because when it says displaying 1-10 and 11-20 and all, nothing is displayed even though the page has finished loading.)
Thanks again.