All pastes #194230 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-10-07 18:06 UTC
rendered paste body
			// Insert class counts
			while (list ($key, $val) = each ($_POST)) {
				if (preg_match('/^(raid_class_.+_count)$/', $key, $match))
				{
					if ($val > 0)
					{
						$class_name = preg_split('/_/', $key);
						$query = $db->build_query('INSERT', array(
							'raid_id'		=> $this_raid_id,
							'class_name'	=> '$class_name[2]',
							'class_count'	=> $val)
						);
						$db->query('INSERT INTO ' . RP_CLASSES_TABLE . $query);
					}
				}
			}
		}