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
2191bf3b
Commit
2191bf3b
authored
Aug 08, 2010
by
Jeffrey Way
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tinkering
parent
f90b4ab8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
MysqlDb.php
MysqlDb.php
+10
-13
No files found.
MysqlDb.php
View file @
2191bf3b
...
...
@@ -121,25 +121,24 @@ class MysqlDB {
* @return string The joined parameter types.
*/
protected
function
_determineType
(
$item
)
{
$param_type
=
array
();
switch
(
gettype
(
$item
))
{
case
'string'
:
$param_type
[]
=
's'
;
$param_type
=
's'
;
break
;
case
'integer'
:
$param_type
[]
=
'i'
;
$param_type
=
'i'
;
break
;
case
'blob'
:
$param_type
[]
=
'b'
;
case
'blob'
:
$param_type
=
'b'
;
break
;
case
'double'
:
$param_type
[]
=
'd'
;
case
'double'
:
$param_type
=
'd'
;
break
;
}
return
implode
(
$param_type
)
;
return
$param_type
;
}
...
...
@@ -208,7 +207,6 @@ class MysqlDB {
$this
->
_query
.=
'('
.
implode
(
$keys
,
', '
)
.
')'
;
$this
->
_query
.=
' VALUES('
;
while
(
$num
!==
0
)
{
(
$num
!==
1
)
?
$this
->
_query
.=
'?, '
:
$this
->
_query
.=
'?)'
;
$num
--
;
...
...
@@ -231,7 +229,6 @@ class MysqlDB {
foreach
(
$tableData
as
$prop
=>
$val
)
{
$args
[]
=
&
$tableData
[
$prop
];
}
call_user_func_array
(
array
(
$stmt
,
'bind_param'
),
$args
);
}
...
...
@@ -263,9 +260,9 @@ class MysqlDB {
call_user_func_array
(
array
(
$stmt
,
'bind_result'
),
$parameters
);
while
(
$stmt
->
fetch
()
)
{
while
(
$stmt
->
fetch
()
)
{
$x
=
array
();
foreach
(
$row
as
$key
=>
$val
)
{
foreach
(
$row
as
$key
=>
$val
)
{
$x
[
$key
]
=
$val
;
}
$results
[]
=
$x
;
...
...
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