Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e973365d
Commit
e973365d
authored
Apr 25, 2007
by
Geoff Cant
Committed by
Geoff Cant
Apr 25, 2007
Browse files
Fixes to search_user_my to work with MYSQL's DISTINCT functionality.
parent
a73d6f40
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/search/internal/lib.php
View file @
e973365d
...
...
@@ -161,7 +161,7 @@ class PluginSearchInternal extends PluginSearch {
$count
=
get_field_sql
(
'
SELECT
COUNT(DISTINCT
u.id
)
COUNT(DISTINCT
owner
)
FROM
'
.
$prefix
.
'usr u
LEFT JOIN '
.
$prefix
.
'artefact a ON u.id=a.owner
...
...
@@ -185,7 +185,7 @@ class PluginSearchInternal extends PluginSearch {
if
(
$count
>
0
)
{
$data
=
get_records_sql_array
(
'
SELECT DISTINCT
ON (u.firstname, u.lastname, u.id)
SELECT DISTINCT
u.id, u.username, u.institution, u.firstname, u.lastname, u.preferredname, u.email, u.staff
FROM '
.
$prefix
.
'artefact a
INNER JOIN '
.
$prefix
.
'usr u ON u.id = a.owner
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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