Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-MySQLi-Database-Class
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
PHP-MySQLi-Database-Class
Commits
24a8a99a
Commit
24a8a99a
authored
Aug 05, 2015
by
Alexander Butenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #286 from Luke-j/Luke-j-patch-1
Changed inc() and dec() methods to support float
parents
16d88ae2
25baa59f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
MysqliDb.php
MysqliDb.php
+10
-4
No files found.
MysqliDb.php
View file @
24a8a99a
...
...
@@ -1280,18 +1280,24 @@ class MysqliDb
/**
* Method generates incremental function call
* @param int increment
amoun
t. 1 by default
* @param int increment
by int or floa
t. 1 by default
*/
public
function
inc
(
$num
=
1
)
{
return
Array
(
"[I]"
=>
"+"
.
(
int
)
$num
);
if
(
!
is_numeric
(
$num
)){
trigger_error
(
'Argument supplied to inc must be a number'
,
E_USER_ERROR
);
}
return
Array
(
"[I]"
=>
"+"
.
$num
);
}
/**
* Method generates decrimental function call
* @param int increment
amoun
t. 1 by default
* @param int increment
by int or floa
t. 1 by default
*/
public
function
dec
(
$num
=
1
)
{
return
Array
(
"[I]"
=>
"-"
.
(
int
)
$num
);
if
(
!
is_numeric
(
$num
)){
trigger_error
(
'Argument supplied to dec must be a number'
,
E_USER_ERROR
);
}
return
Array
(
"[I]"
=>
"-"
.
$num
);
}
/**
...
...
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