Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
don
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LQDN Adminsys
don
Commits
91e2f6f9
Commit
91e2f6f9
authored
Dec 03, 2018
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using FETCH_COLUMN for the user id
parent
b4dfbe51
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/LQDN/Handler/UserHandler.php
src/LQDN/Handler/UserHandler.php
+2
-1
No files found.
src/LQDN/Handler/UserHandler.php
View file @
91e2f6f9
...
...
@@ -91,8 +91,9 @@ class UserHandler
public
function
handleAdminUpdateTotalUsersCommand
(
AdminUpdateTotalUsersCommand
$command
)
{
// Let's get all users first
$user_ids
=
$this
->
connection
->
executeQuery
(
'SELECT id FROM users'
)
->
fetchAll
(
\
PDO
::
FETCH_
ASSOC
);
$user_ids
=
$this
->
connection
->
executeQuery
(
'SELECT id FROM users'
)
->
fetchAll
(
\
PDO
::
FETCH_
COLUMN
);
var_dump
(
$user_ids
);
foreach
(
$user_ids
as
$user_id
)
{
$user_id
=
(
int
)
$user_id
;
$total
=
$this
->
connection
->
executeQuery
(
'SELECT SUM(somme) AS total FROM dons WHERE user_id = :user_id AND STATUS IN (1, 102)'
,
[
...
...
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