Changeset 11867

Show
Ignore:
Timestamp:
08/30/07 14:45:18 (1 year ago)
Author:
netblade
Message:

Added two set_limit's, because in both case we only used the first result we got from query

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/net.nehmer.static/handler/view.php

    r11852 r11867  
    105105        $qb->add_constraint('name', '=', $args[0]); 
    106106        $qb->add_constraint('up', '=', 0); 
     107        $qb->add_limit(1); 
    107108         
    108109        if ($qb->count() == 0) 
     
    142143            $qb->add_constraint('topic', '=', $this->_content_topic->id); 
    143144            $qb->add_constraint('name', '=', 'index'); 
     145            $qb->set_limit(1); 
    144146            $result = $qb->execute(); 
    145147