Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Comptoir
Comptoir-srv
Commits
57fbd4f5
Commit
57fbd4f5
authored
May 26, 2021
by
Fabrice Gangler
🎨
Browse files
CI: use phpcbf before commit
parent
9767ba67
Pipeline
#17930
passed with stage
in 8 minutes and 16 seconds
Changes
1
Pipelines
13
Hide whitespace changes
Inline
Side-by-side
Documentation/For_developers/Features/SILL/2020/prepare_SQL.php
View file @
57fbd4f5
...
...
@@ -18,17 +18,17 @@ $url = "https://raw.githubusercontent.com/DISIC/sill/master/2020/sill-2020.csv";
$fileName
=
'SILL_2020.csv'
;
$dataSrc
=
file_get_contents
(
$url
);
file_put_contents
(
$fileName
,
$dataSrc
);
/* [0] => ID
[1] => nom
[2] => fonction
[3] => annees
[4] => statut
[5] => parent
[6] => public
[7] => support
[8] => similaire-a
[9] => wikidata
[10] => comptoir-du-libre
[11] => licence */
[1] => nom
[2] => fonction
[3] => annees
[4] => statut
[5] => parent
[6] => public
[7] => support
[8] => similaire-a
[9] => wikidata
[10] => comptoir-du-libre
[11] => licence */
// column numbers of the csv file
$numberOfFileFields
=
17
;
...
...
@@ -71,8 +71,8 @@ if (($handle = fopen($fileName, "r")) !== false) {
foreach
(
$lineYears
as
$year
)
{
$year
=
trim
(
$year
);
if
(
$year
!==
''
)
{
$year
=
(
int
)
$year
;
$years
[
$year
][
$idComptoir
]
=
$idWikidata
;
$year
=
(
int
)
$year
;
$years
[
$year
][
$idComptoir
]
=
$idWikidata
;
}
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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