mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-08-19 19:53:18 +02:00
🚚 Moved class and scripts.
This commit is contained in:
@@ -10,10 +10,9 @@ class dump {
|
|||||||
$this->pdo = $pdo;
|
$this->pdo = $pdo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function sendThese() {
|
public function sendThese() {
|
||||||
$sql = 'SELECT * FROM theses';
|
$sql = 'SELECT * FROM theses';
|
||||||
$req = $pdo->query($sql);
|
$req = $this->pdo->query($sql);
|
||||||
while($row = $req->fetch()) {
|
while($row = $req->fetch()) {
|
||||||
echo "<p>" . $row['author'] . " | " . $row['title'] . "</p>";
|
echo "<p>" . $row['author'] . " | " . $row['title'] . "</p>";
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=projet_prog_web', 'root', 'root');
|
$pdo = new PDO('mysql:host=localhost;dbname=projet_prog_web', 'root', 'root');
|
||||||
|
|
||||||
// dump_abes_thesesfr.csv
|
|
||||||
|
|
||||||
$row = 1;
|
$row = 1;
|
||||||
if (($handle = fopen("dump_abes_thesesfr.csv", "r")) !== FALSE) {
|
if (($handle = fopen("scripts/dump_abes_thesesfr.csv", "r")) !== FALSE) {
|
||||||
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
|
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
|
||||||
$num = count($data);
|
$num = count($data);
|
||||||
echo "<p>---------------- " . $row . " -----------------<br /></p>\n";
|
echo "<p>---------------- " . $row . " -----------------<br /></p>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user