Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI05
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fredrick Mangampu Theodorus Pardosi
PA1-1617-D3TI05
Commits
70ce52dc
Commit
70ce52dc
authored
May 24, 2017
by
Fredrick Mangampu Theodorus Pardosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
aff6e1e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
koneksi.php
connection/koneksi.php
+2
-2
fungsi.php
functions/fungsi.php
+5
-5
No files found.
connection/koneksi.php
View file @
70ce52dc
<?php
$database
=
new
mysqli
(
'127.0.0.1'
,
'root'
,
''
,
'cafe_db'
);
\ No newline at end of file
$database
=
new
mysqli
(
'127.0.0.1'
,
'root'
,
''
,
'p1d3ti05_cafedb'
);
\ No newline at end of file
functions/fungsi.php
View file @
70ce52dc
<?php
global
$conn
;
$conn
=
mysqli_connect
(
"localhost"
,
"
root"
,
"
"
);
$conn
=
mysqli_connect
(
"localhost"
,
"
p1d3ti05"
,
"Fredrick8
"
);
if
(
!
$conn
){
die
(
"database connect problem"
);
}
$db_use
=
mysqli_select_db
(
$conn
,
"
cafe_
db"
)
or
die
(
"select db problem!!"
);
$db_use
=
mysqli_select_db
(
$conn
,
"
p1d3ti05_cafe
db"
)
or
die
(
"select db problem!!"
);
function
execQ
(
$strQ
){
global
$conn
;
$res
=
mysql
_query
(
$strQ
,
$conn
);
$res
=
mysql
i_query
(
$conn
,
$strQ
);
return
$res
;
}
...
...
@@ -62,9 +62,9 @@ global $conn;
$resItem
=
execQ
(
$strQ
);
if
(
mysql_num_rows
(
$resItem
)
!=
0
){
if
(
mysql
i
_num_rows
(
$resItem
)
!=
0
){
$ret
=
array
();
while
(
$data
=
mysql_fetch_assoc
(
$resItem
)){
while
(
$data
=
mysql
i
_fetch_assoc
(
$resItem
)){
array_push
(
$ret
,
array
(
'id'
=>
$data
[
'id'
],
'name'
=>
$data
[
'name'
],
...
...
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