Nostal Posted September 16, 2006 Share Posted September 16, 2006 [code]while($row = mysql_fetch_array($result)) { echo "<tr><td width='40%' bgcolor='#666666'>"; echo "<div class='hbfield2'><a href='?cat=characters&id=$row[id]'>".$row[name]."</a></div>"; echo "</td><td width='40%' bgcolor='#666666'>"; while($row = mysql_fetch_array($result)) { $series = explode(" ", $row[series]); if ($series[0]=="1"){ $series[0] = "<div class='hbfield2'>Event Zero</div>"; } else{ $series[0] = ""; } if ($series[1]=="1"){ $series[1] = "<div class='hbfield2'>The Radicals</div>"; } else{ $series[1] = ""; } if ($series[2]=="1"){ $series[2] = "<div class='hbfield2'>The Paladins</div>"; } else{ $series[2] = ""; } if ($series[3]=="1"){ $series[3] = "<div class='hbfield2'>Event Zero, The Radicals</div>"; } else{ $series[3] = ""; } if ($series[4]=="1"){ $series[4] = "<div class='hbfield2'>Event Zero, The Paladins</div>"; } else{ $series[4] = ""; } if ($series[5]=="1"){ $series[5] = "<div class='hbfield2'>The Radicals, The Paladins</div>"; } else{ $series[5] = ""; } echo "$series"; } echo "</td><td width='20%' bgcolor='#666666'>"; echo "<div class='hbfield2'>".$row[affiliation]."</div>"; echo "</td></tr>";}[/code]Could anyone tell me what might be wrong with this code and also tell me what type of mysql table field type I would need to create a field for "0 0 0 0 0 0" where a "1" would mean it is "activated/on" kind of how binary functions? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 16, 2006 Share Posted September 16, 2006 Well, there's no reason why you can't use the new BIT field type. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.