From e2dfb7fd3f5da5fac7788ed8bcb146b29d87a8c2 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Feb 2014 16:25:49 +0100 Subject: mv --- blob/insertfile.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 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..8053eb5 --- /dev/null +++ b/blob/insertfile.php @@ -0,0 +1,37 @@ +"; + + 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