commit | author | age
|
8a5d94
|
1 |
<?php |
JK |
2 |
require_once('./class/std.php'); |
|
3 |
$files = glob('database/*.sqlite'); |
|
4 |
$count = count($files); |
|
5 |
|
|
6 |
header('Content-Type: text/plain'); |
|
7 |
|
|
8 |
foreach($files as $num => $file) { |
|
9 |
echo 'Plik '.$num.' z '.$count.' ('.$file.')...'."\n"; |
|
10 |
flush(); |
|
11 |
|
|
12 |
$PDO = new PDO('sqlite:'.BOT_TOPDIR.'/'.$file); |
|
13 |
$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
|
14 |
$PDO->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING); |
|
15 |
$stmt = $PDO->query('UPDATE data SET class=\'kino\' WHERE class=\'\' AND name=\'kino\''); |
|
16 |
$stmt->closeCursor(); |
|
17 |
echo "\t".'poprawiono '.$stmt->rowCount().' zmiennych sesyjnych'."\n"; |
|
18 |
unset($stmt); |
|
19 |
flush(); |
|
20 |
|
|
21 |
unset($PDO); |
|
22 |
} |
|
23 |
?> |