Listing database values in a select/option



I’m beating myself up here because I had this, and I changed something it stopped working and then my power went out. so I’ve forgotten what the heck I did. I know I can get it to work, I just can;t figure out how I did it :(. Maybe an extra set of eyes will help:

class Module_Battle extends Base_Module
      Function: start

    public function start()
        // You may call the requireLogin() function if this module is only available to players who are logged in.

        if (isset($_POST['battle_mob']))

          $query = $this->db->execute('SELECT `id`, `name` FROM `<ezrpg>mobs`');
          $mobs = $this->db->fetchAll($query);
  <form method="post" action="index.php?mod=Battle">
    <select name="selection">
      {foreach from=$mobs item=mob}
        <option value="{$mob->name}">{$mob->name}($mob->id)</option>
    <input name="battle_mob" type="submit" value="Fight" class="button" />