blcygzs 发表于 2012-4-20 15:07:23

我想循环文章出来,读取 每篇文章的栏目名称 请 大家教教。


      <?php
      foreach($products_list as $row):
      ?>
      <tr>
      <td class="hl"><?php echo $row->id; ?></td>
      <td class="hl">
              <?php
                                $query = $this->db->get_where('ou118_products_cid', array('productscid_id' => $row->cid_id), '1','1');
                                var_dump($query);
                        ?>
      </td>
      <td class="hl"><?php echo $row->name; ?></td>
      <td class="hl"><?php echo $row->bianhao; ?></td>
      <td class="hl"><?php echo $row->last_date; ?></td>
      <td class="hc">
      <input type="button" name="button2" id="button2" value="编辑" onClick="" />
      <input type="button" name="button2" id="button2" value="删除" onClick="" />
      </td>
      </tr>
      <?php
      endforeach;
      ?>


我想循环文章出来,读取 每篇文章的栏目名称

文章表 跟 文章栏目表 是分开的。 请 大家教教。
页: [1]
查看完整版本: 我想循环文章出来,读取 每篇文章的栏目名称 请 大家教教。