Hy all,
I've got a part of a code like this :
if ($myrow["has_politics"] & 1) {
$galaxy = "<td width=\"20%\" align=center bgcolor=\"lightblue\">".
"<a class=\"x\" href=\"politics.php\">Politics</a>";
} else if ($myrow["has_politics"] & 2) {
$galaxy = "<td width=\"20%\" align=center bgcolor=\"lightblue\">".
"<a class=\"x\" href=\"allforum.php\">Alliance</a>";
The "has_politics" is a resource row from mysql query named $myrow.
But what i don't understand if what does the & 1 mean after it or the & 2 ?
Does it mean if the "has_politics" row = 1 then $galaxy becomes lightblue ? or is it something else ?
Here is the code which sets that value in mysql:
$q = "UPDATE planet set has_politics = has_politics | 1 ".
"WHERE x='$myrow[x]' AND y='$myrow[y]' AND id!='$Planetid'";
$result = mysql_query ($q, $db);
So can someone explain some of this ?
I hope to hear something soon I realy need this
thnx in advance....
pMzQ,