]> git.pld-linux.org Git - projects/buildlogs.git/commitdiff
- show error when the query fails.
authorwitekfl <witekfl@pld-linux.org>
Sun, 25 Nov 2007 12:36:27 +0000 (12:36 +0000)
committerwitekfl <witekfl@pld-linux.org>
Sun, 25 Nov 2007 12:36:27 +0000 (12:36 +0000)
obsolete/buildlogs.sql/addlog.php

index 06fa3238bc066dcf1ba78e752b21529d103b8bdf..f65f009e884facd6eef030237547b5bb5097e17b 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/php.cli
 <?php
-// $Revision: 1.3 $, $Date: 2007-11-24 11:10:33 $
+// $Revision: 1.4 $, $Date: 2007-11-24 17:00:46 $
 $database = 'sqlite:/home/services/ftp/buildlogs.db';
 $root_directory = '/home/services/ftp/pub/pld-buildlogs';
 // $database and $root_directory are taken from buildlogs.inc .
@@ -70,8 +70,9 @@ if (count($result) == 1) {
 } else {
        $query = "INSERT INTO logs(arch_id, result, size, mtime, spec) VALUES($arch_id, $result_id, $size, $mtime, '$spec_name')";
 }
-//echo "$query\n";
-$dbh->beginTransaction();
-$dbh->exec("$query");
-$dbh->commit();
+
+$ile = $dbh->exec("$query");
+if ($ile != 1) {
+       print_r($dbh->errorInfo());
+}
 ?>
This page took 0.094627 seconds and 4 git commands to generate.