• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unserialize (multi category) ....

#2
[eluser]srpurdy[/eluser]
Okay I totally forgot about the mysql like()

This looks much better. Smile

1 Query instead of an exponential query of destruction Big Grin

Code:
?php foreach( $query->result() as $id ) : ?>
<?#GET THE VIDEO ENTRYS?>
<?$this->db->order_by("date", "desc");?>
<?$this->db->like('tags', url_title($this->uri->segment(3)));?>
<?$this->db->where('is_segment', 'Y');?>
<?$get_row = $this->db->get('videos');?>
              <?php foreach($get_row->result() as $pv):?>
        <?php if($pv->is_segment == 'Y'):?>
          <div class="video">
            <h4>&lt;?=htmlspecialchars($pv->name, ENT_COMPAT, 'UTF-8');?&gt;<a >id?&gt;/&lt;?=$pv->time_index?&gt;/&lt;?=$this->uri->segment(3);?&gt;"><img style="float: right; margin-top: -3px;" src="&lt;?=base_url();?&gt;themes/isr_2011/img/watch.png" alt="Watch" /></a></h4>
            <div class="video_content"><img >pic?&gt;" alt="" align="left" style="padding: 5px;" />&lt;?=$pv->desc?&gt;</div>
        </div>
        &lt;?php endif;?&gt;
              &lt;?php endforeach;?&gt;
&lt;?php endforeach; ?&gt;


Messages In This Thread
unserialize (multi category) .... - by El Forum - 11-26-2010, 02:22 PM
unserialize (multi category) .... - by El Forum - 11-29-2010, 02:58 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.