Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MediaDBPythonScripte
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
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
BA_SI-Projekt
MediaDBPythonScripte
Commits
5c721cd5
Commit
5c721cd5
authored
Mar 09, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
8a8d89e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
media.class.php
media.class.php
+13
-5
No files found.
media.class.php
View file @
5c721cd5
...
@@ -396,7 +396,9 @@ class Media {
...
@@ -396,7 +396,9 @@ class Media {
if
(
!
(
strpos
(
$value
,
"as"
)
==
false
)){
if
(
!
(
strpos
(
$value
,
"as"
)
==
false
)){
$value
=
explode
(
"as"
,
$value
);
$value
=
explode
(
"as"
,
$value
);
$value
[
1
]
=
str_replace
(
"(uncredited)"
,
""
,
$value
[
1
]);
$value
[
1
]
=
str_replace
(
"(uncredited)"
,
""
,
$value
[
1
]);
$value
[
1
]
=
str_replace
(
"("
,
""
,
$value
[
1
]);
//$value[1] = str_replace("(voice)", "", $value[1]);
//$value[1] = str_replace("(voice)", "", $value[1]);
$SchauspielerRollen
[
trim
(
$value
[
0
])]
=
trim
(
$value
[
1
]);
$SchauspielerRollen
[
trim
(
$value
[
0
])]
=
trim
(
$value
[
1
]);
}
}
}
}
...
@@ -748,10 +750,15 @@ class Media {
...
@@ -748,10 +750,15 @@ class Media {
else
if
(
$key
==
"Schauspieler"
){
else
if
(
$key
==
"Schauspieler"
){
$Schauspielers
=
explode
(
" / "
,
$value
);
$Schauspielers
=
explode
(
" / "
,
$value
);
echo
" Schauspieler anlegen... "
;
echo
" Schauspieler anlegen... "
;
foreach
(
$Schauspielers
as
$value3
)
{
foreach
(
$Schauspielers
as
$
Key
=>
$
value3
)
{
//$Schauspieler = explode(">", str_replace("nm", "", $value3));
//$Schauspieler = explode(">", str_replace("nm", "", $value3));
//$Querys[] = "INSERT INTO FilmSchauspieler (imdbID, schauspielerID) VALUES ('".$DataArr['imdbID']."', '".$this->getSchauspielerID($mysqli, $Schauspieler[1],$Schauspieler[0])."');";
$Querys
[]
=
"INSERT INTO FilmSchauspieler (imdbID, schauspielerID, role)
VALUES ('"
.
$DataArr
[
'imdbID'
]
.
"', '"
.
$this
->
getSchauspielerID
(
$mysqli
,
$value3
[
0
],
$Key
)
.
"', '"
.
$mysqli
->
real_escape_string
(
$value3
[
1
])
.
"');"
;
// TODO Rolle Ergänzen!!!!!
// TODO Rolle Ergänzen!!!!!
var_dump
(
$Querys
);
exit
;
}
}
echo
"done"
.
PHP_EOL
;
echo
"done"
.
PHP_EOL
;
}
}
...
@@ -818,9 +825,10 @@ class Media {
...
@@ -818,9 +825,10 @@ class Media {
}
}
else
{
else
{
$Query
=
"INSERT INTO Schauspieler (name, schauspielerID) VALUES('"
.
mysql_escape_string
((
$SchauspielerName
))
.
"', '"
.
$SchauspielerID
.
"');"
;
$Query
=
"INSERT INTO Schauspieler (name, schauspielerID) VALUES('"
.
mysql_escape_string
((
$SchauspielerName
))
.
"', '"
.
$SchauspielerID
.
"');"
;
//
echo PHP_EOL.$this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL;
echo
PHP_EOL
.
$this
->
Console
->
getColoredString
(
"Query"
,
"light_gray"
,
"green"
)
.
" "
.
$Query
.
PHP_EOL
;
//echo $SchauspielerName.", ";
//echo $SchauspielerName.", ";
$mysqli
->
query
(
$Query
);
//$mysqli->query($Query);
exit
;
return
$SchauspielerID
;
return
$SchauspielerID
;
}
}
}
}
...
...
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