🚚 Moved class and scripts.

This commit is contained in:
Florian SYLVAIN
2021-09-17 11:58:35 +02:00
parent 2d2ff696c2
commit 228d25c279
4 changed files with 4 additions and 5 deletions
@@ -10,10 +10,9 @@ class dump {
$this->pdo = $pdo;
}
public function sendThese() {
$sql = 'SELECT * FROM theses';
$req = $pdo->query($sql);
$req = $this->pdo->query($sql);
while($row = $req->fetch()) {
echo "<p>" . $row['author'] . " | " . $row['title'] . "</p>";
}
+3 -3
View File
@@ -1,10 +1,10 @@
<?php
$pdo = new PDO('mysql:host=localhost;dbname=projet_prog_web', 'root', 'root');
// dump_abes_thesesfr.csv
$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) {
$num = count($data);
echo "<p>---------------- " . $row . " -----------------<br /></p>\n";
@@ -27,4 +27,4 @@
echo "<p>" . $row['author'] . " | " . $row['title'] . "</p>";
}
$req->closeCursor();
*/
*/