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
8eea785a
Commit
8eea785a
authored
Aug 17, 2015
by
Alexander Butenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #298 from dave-swift/master
Swapped trigger_error for exceptions
parents
47461b15
483efad1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
MysqliDb.php
MysqliDb.php
+4
-5
dbObject.php
dbObject.php
+0
-1
No files found.
MysqliDb.php
View file @
8eea785a
...
...
@@ -1189,7 +1189,7 @@ class MysqliDb
protected
function
_prepareQuery
()
{
if
(
!
$stmt
=
$this
->
mysqli
()
->
prepare
(
$this
->
_query
))
{
t
rigger_error
(
"Problem preparing query (
$this->_query
) "
.
$this
->
mysqli
()
->
error
,
E_USER_ERROR
);
t
hrow
new
Exception
(
"Problem preparing query (
$this->_query
) "
.
$this
->
mysqli
()
->
error
);
}
if
(
$this
->
traceEnabled
)
$this
->
traceStartQ
=
microtime
(
true
);
...
...
@@ -1314,7 +1314,7 @@ class MysqliDb
if
(
!
empty
(
$matches
[
2
]))
$items
=
$matches
[
2
];
if
(
!
empty
(
$matches
[
3
]))
$type
=
$matches
[
3
];
if
(
!
in_array
(
$type
,
array_keys
(
$types
)))
t
rigger_error
(
"invalid interval type in '
{
$diff
}
'"
);
t
hrow
new
Exception
(
"invalid interval type in '
{
$diff
}
'"
);
$func
.=
" "
.
$incr
.
" interval "
.
$items
.
" "
.
$types
[
$type
]
.
" "
;
}
return
$func
;
...
...
@@ -1341,7 +1341,7 @@ class MysqliDb
*/
public
function
inc
(
$num
=
1
)
{
if
(
!
is_numeric
(
$num
)){
t
rigger_error
(
'Argument supplied to inc must be a number'
,
E_USER_ERROR
);
t
hrow
new
Exception
(
'Argument supplied to inc must be a number'
);
}
return
Array
(
"[I]"
=>
"+"
.
$num
);
}
...
...
@@ -1352,7 +1352,7 @@ class MysqliDb
*/
public
function
dec
(
$num
=
1
)
{
if
(
!
is_numeric
(
$num
)){
t
rigger_error
(
'Argument supplied to dec must be a number'
,
E_USER_ERROR
);
t
hrow
new
Exception
(
'Argument supplied to dec must be a number'
);
}
return
Array
(
"[I]"
=>
"-"
.
$num
);
}
...
...
@@ -1487,4 +1487,3 @@ class MysqliDb
return
$this
->
count
==
$count
;
}
}
// END class
?>
dbObject.php
View file @
8eea785a
...
...
@@ -688,4 +688,3 @@ class dbObject {
spl_autoload_register
(
"dbObject::dbObjectAutoload"
);
}
}
?>
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