BARRAUX Arthur
3 years ago
20 changed files with 23 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||||
|
<?php |
||||
|
include '../session_restraintes.php'; |
||||
|
|
||||
|
$bdd = new PDO('mysql:host=localhost;dbname=ticket;charset:utf8', 'root', ''); |
||||
|
$reponse = $bdd->query("SELECT DISTINCT * FROM `pannes`"); |
||||
|
$stream = fopen('export/ticket.csv', 'w'); |
||||
|
|
||||
|
while($line = $reponse->fetch()) { |
||||
|
print_r($line); |
||||
|
echo '<br>'; |
||||
|
fputcsv( |
||||
|
$stream, // file |
||||
|
$line, // arr |
||||
|
); |
||||
|
} |
||||
|
$reponse->closeCursor(); |
||||
|
fclose($stream); |
||||
|
?> |
|
Loading…
Reference in new issue