Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
004d0c1c
Commit
004d0c1c
authored
Apr 08, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 286686: ORDER BY column needs to be selected or grouped
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
parent
95973482
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
User.pm
Bugzilla/User.pm
+6
-4
summarize_time.cgi
summarize_time.cgi
+2
-1
No files found.
Bugzilla/User.pm
View file @
004d0c1c
...
...
@@ -598,7 +598,8 @@ sub match {
# Build the query.
my
$sqlstr
=
&::
SqlQuote
(
$wildstr
);
my
$query
=
"SELECT DISTINCT userid, realname, login_name "
.
my
$query
=
"SELECT DISTINCT userid, realname, login_name, "
.
"LENGTH(login_name) AS namelength "
.
"FROM profiles "
;
if
(
&::
Param
(
'usevisibilitygroups'
))
{
$query
.=
", user_group_map "
;
...
...
@@ -613,7 +614,7 @@ sub match {
"AND grant_type <> "
.
GRANT_DERIVED
;
}
$query
.=
" AND disabledtext = '' "
if
$exclude_disabled
;
$query
.=
"ORDER BY
length(login_name)
"
;
$query
.=
"ORDER BY
namelength
"
;
$query
.=
$dbh
->
sql_limit
(
$limit
)
if
$limit
;
# Execute the query, retrieve the results, and make them into
...
...
@@ -648,7 +649,8 @@ sub match {
my
$sqlstr
=
&::
SqlQuote
(
uc
(
$str
));
my
$query
=
"SELECT DISTINCT userid, realname, login_name "
.
my
$query
=
"SELECT DISTINCT userid, realname, login_name, "
.
"LENGTH(login_name) AS namelength "
.
"FROM profiles"
;
if
(
&::
Param
(
'usevisibilitygroups'
))
{
$query
.=
", user_group_map"
;
...
...
@@ -665,7 +667,7 @@ sub match {
" AND grant_type <> "
.
GRANT_DERIVED
;
}
$query
.=
" AND disabledtext = ''"
if
$exclude_disabled
;
$query
.=
" ORDER BY
length(login_name)
"
;
$query
.=
" ORDER BY
namelength
"
;
$query
.=
" "
.
$dbh
->
sql_limit
(
$limit
)
if
$limit
;
&::
PushGlobalSQLState
();
&::
SendSQL
(
$query
);
...
...
summarize_time.cgi
View file @
004d0c1c
...
...
@@ -322,7 +322,8 @@ sub get_inactive_bugs {
WHERE longdescs.bug_id IN ($buglist)
$date_bits }
.
$dbh
->
sql_group_by
(
'longdescs.bug_id'
,
'bugs.short_desc, bugs.bug_status'
)
.
qq{
'bugs.short_desc, bugs.bug_status,
longdescs.bug_when'
)
.
qq{
ORDER BY longdescs.bug_when}
;
$sth
=
$dbh
->
prepare
(
$q
);
$sth
->
execute
(
@
{
$date_values
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment