Jump to content

Nostal

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

About Nostal

  • Birthday 05/17/1984

Profile Information

  • Gender
    Not Telling

Nostal's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [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?
  2. I've been creating a database for a series of comic books that a group of friends and I are publishing and within our database we want all entries to include which series it came from. At first I was going to create 3 fields in each table called series1, series2, and series3 and then just use a WHERE statement in my query, however, there must be an easier way to do this and with only a single field. Or am I wrong? Please let me know as soon as possible. Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.