Menu

#15 sort by priority broken

open
nobody
None
5
2003-08-21
2003-08-21
No

trying to sort by priority (or other fields too probably)
is broken

I turned on debugging and looked at the SQL generated.
There is no join criteria for two tables.

e.g. the following is for a "Sorted by:Priority"

(mysql): SELECT tickets.*,(UNIX_TIMESTAMP(NOW()) -
UNIX_TIMESTAMP(tickets.date_modified)) as
age,UNIX_TIMESTAMP(tickets.date_added) AS added_ts FROM
tickets,priority WHERE (tickets.project = 5)AND
(tickets.status != '3' AND tickets.status != '7') AND
(tickets.creator = '3') AND (tickets.project IN(5) OR
((tickets.creator = 3) OR (tickets.owner = 3)) ) ORDER
BY priority.name LIMIT 0,15

The problem seems to be in lib/database.inc.php :344
if ($filed = "") {
should be
if ($filed == "") {

... oldest bug in the book

Discussion


Log in to post a comment.

MongoDB Logo MongoDB