From c5639ee890215e4e8e0f544821ea8d285ca58eb8 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 13 Sep 2014 22:26:58 +0200 Subject: init --- blob/insertfile.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 blob/insertfile.php (limited to 'blob/insertfile.php') diff --git a/blob/insertfile.php b/blob/insertfile.php new file mode 100644 index 0000000..d098223 --- /dev/null +++ b/blob/insertfile.php @@ -0,0 +1,41 @@ +"; + + 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!"; +} -- cgit v1.2.3