Ticket #1002 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

remove LIMIT from DA_Navigation

Reported by: kanji78 Assigned to: demian
Priority: normal Milestone: 0.6.0
Component: module - navigation Severity: normal
Keywords: Cc:

Description

I've replaced LIMIT with limitQuery on method getAliasBySectionId($id).

patch (tested with Oracle and Mysql) :

Index: S:/eclipse/workspace/0.6-bugfix/modules/navigation/classes/DA_Navigation.php =================================================================== --- S:/eclipse/workspace/0.6-bugfix/modules/navigation/classes/DA_Navigation.php (revision 2114) +++ S:/eclipse/workspace/0.6-bugfix/modules/navigation/classes/DA_Navigation.php (working copy) @@ -313,9 +313,10 @@

$query = "

SELECT uri_alias FROM {$this->conftable?uri_alias?}

- WHERE section_id = $id - LIMIT 1"; - return $this->dbh->getOne($query); + WHERE section_id = $id"; + $result = $this->dbh->limitQuery($query,0,1); + $row =& $result->fetchRow(); + return $row->uri_alias;

}

function updateUriAlias($aliasName, $target)

Attachments

patch.txt (0.8 kB) - added by kanji78 on 06/07/06 10:27:07.

Change History

06/07/06 10:27:07 changed by kanji78

  • attachment patch.txt added.

06/07/06 10:43:24 changed by demian

  • owner changed from kanji78 to demian.
  • status changed from new to assigned.

06/11/06 19:49:07 changed by demian

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [2119]) applied limit query patch, fixes #1002