Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMS-z
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Zysik
VMS-z
Commits
56d62df8
Commit
56d62df8
authored
6 years ago
by
Christoph Zysik
Browse files
Options
Downloads
Patches
Plain Diff
don't drop below zero or worse, flow flow flow
parent
219caef8
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
class/campaigns.php
+1
-1
1 addition, 1 deletion
class/campaigns.php
with
1 addition
and
1 deletion
class/campaigns.php
+
1
−
1
View file @
56d62df8
...
...
@@ -14,7 +14,7 @@ class Campaigns
public
function
decreaseAvailCountById
(
$id
,
$value
=
1
)
{
$sql
=
'UPDATE `'
.
DB_PREFIX
.
'_gebuchte_werbung` SET `menge` = `menge` - :value WHERE `id`= :id'
;
$sql
=
'UPDATE `'
.
DB_PREFIX
.
'_gebuchte_werbung` SET `menge` =
GREATEST(0,
`menge` - :value
)
WHERE `id`= :id'
;
$sql_params
=
array
(
':id'
=>
$id
,
':value'
=>
$value
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment