summaryrefslogtreecommitdiff
path: root/www/insertfile.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/insertfile.php')
-rw-r--r--www/insertfile.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/www/insertfile.php b/www/insertfile.php
deleted file mode 100644
index 8053eb5..0000000
--- a/www/insertfile.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?
-
-$dic = "../blob/en_GB.dic";
-$table = "english";
-
-$bool = false;
-
-$db = new SQLite3("../database/dict.db");
-
-
-if($file = file($dic)){
-
- $rows = count($file);
- for($i=0;$i<$rows;$i++){
-
- $file[$i] = preg_replace("/\/(.*)$/", "", $file[$i]);
-// echo "#" . $i . ": " . $file[$i] . "<br>";
-
- if(!$db->exec("
- BEGIN TRANSACTION;
- INSERT INTO " . $table . " VALUES (NULL, \"" . $file[$i] . "\");
- COMMIT;
- ")){
- echo "Failure writing to the database at row" . $i ."!";
- $bool = true;
- break;
- }
-
- }
-
- if(!$bool){
- echo "Successfull transfered the file into the database.";
- }
-
-} else {
- echo "No file found!";
-}