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
b71d0cdf
Commit
b71d0cdf
authored
Jun 15, 2021
by
Estéban Ristich
Committed by
Gabriel Moreau
Jun 23, 2021
Browse files
Adding function to get loan date interval
parent
ee5f4283
Changes
1
Hide whitespace changes
Inline
Side-by-side
module/db-functions.php
View file @
b71d0cdf
...
...
@@ -447,6 +447,16 @@ function get_loan_find($pdo, $find) {
// ---------------------------------------------------------------------
function
get_loan_interval_by_id
(
$pdo
,
$id_equipment
)
{
$sql
=
'SELECT emprunt, retour FROM pret WHERE id = ?;'
;
$stmt
=
$pdo
->
prepare
(
$sql
);
$stmt
->
execute
(
array
(
$id_equipment
));
$result_fetch
=
$stmt
->
fetcAll
(
PDO
::
FETCH_ASSOC
);
return
$result_fetch
;
}
// ---------------------------------------------------------------------
function
set_loan_new
(
$pdo
,
$id_equipment
,
$id_team
,
$date_begin
,
$date_end
,
$comment
)
{
$sql
=
'INSERT INTO pret (nom, equipe, emprunt, retour, commentaire) VALUES (?, ?, ?, ?, ?);'
;
$stmt
=
$pdo
->
prepare
(
$sql
);
...
...
@@ -471,6 +481,7 @@ function del_loan_by_id($pdo, $id) {
return
$iostat
;
}
// ---------------------------------------------------------------------
// Supplier
// ---------------------------------------------------------------------
...
...
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