Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
legi
soft
gestex
Commits
aee4fbf6
Commit
aee4fbf6
authored
Oct 28, 2020
by
Gabriel Moreau
Browse files
Add function get_loan_count_by_team
parent
8e88d263
Changes
1
Hide whitespace changes
Inline
Side-by-side
module/db-functions.php
View file @
aee4fbf6
...
...
@@ -417,6 +417,16 @@ function get_loan_listall_by_team($pdo, $id_team) {
// ---------------------------------------------------------------------
function
get_loan_count_by_team
(
$pdo
,
$id_team
)
{
$sql
=
'SELECT COUNT(*) as count FROM pret AS l INNER JOIN Listing AS e ON l.nom = e.id WHERE e.equipe = ?;'
;
$stmt
=
$pdo
->
prepare
(
$sql
);
$stmt
->
execute
(
array
(
$id_team
));
$result_fetch
=
$stmt
->
fetchAll
(
PDO
::
FETCH_ASSOC
);
return
$result_fetch
[
0
][
'count'
];
}
// ---------------------------------------------------------------------
function
get_loan_find
(
$pdo
,
$find
)
{
$sql
=
'SELECT * FROM pret WHERE commentaire RLIKE ?;'
;
$stmt
=
$pdo
->
prepare
(
$sql
);
...
...
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