Lines 117-123
unless ($confirm) {
Link Here
|
117 |
} |
117 |
} |
118 |
|
118 |
|
119 |
# In my opinion, this line is safe SQL to have outside the API. --atz |
119 |
# In my opinion, this line is safe SQL to have outside the API. --atz |
120 |
our $bounds_sth = C4::Context->dbh->prepare("SELECT DATE_SUB(CURDATE(), INTERVAL ? DAY)"); |
120 |
our $bounds_sth = C4::Context->dbh->prepare("SELECT DATE_SUB(CAST(now() AS date), INTERVAL ? DAY)"); |
121 |
|
121 |
|
122 |
sub bounds ($) { |
122 |
sub bounds ($) { |
123 |
$bounds_sth->execute(shift); |
123 |
$bounds_sth->execute(shift); |
Lines 130-137
sub longoverdue_sth {
Link Here
|
130 |
SELECT items.itemnumber, borrowernumber, date_due |
130 |
SELECT items.itemnumber, borrowernumber, date_due |
131 |
FROM issues, items |
131 |
FROM issues, items |
132 |
WHERE items.itemnumber = issues.itemnumber |
132 |
WHERE items.itemnumber = issues.itemnumber |
133 |
AND DATE_SUB(CURDATE(), INTERVAL ? DAY) > date_due |
133 |
AND DATE_SUB(CAST(now() AS date), INTERVAL ? DAY) > date_due |
134 |
AND DATE_SUB(CURDATE(), INTERVAL ? DAY) <= date_due |
134 |
AND DATE_SUB(CAST(now() AS date), INTERVAL ? DAY) <= date_due |
135 |
AND itemlost <> ? |
135 |
AND itemlost <> ? |
136 |
ORDER BY date_due |
136 |
ORDER BY date_due |
137 |
"; |
137 |
"; |
138 |
- |
|
|