Jelajahi Sumber

[Bugfix] Error finding DB

Foppe Hemminga 5 tahun lalu
induk
melakukan
ef10c4c5aa
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      snippets.php

+ 2 - 2
snippets.php

@@ -4,7 +4,7 @@
 
 
 $pdo = null;
 $pdo = null;
 try {
 try {
-	$pdo = new PDO("sqlite:" . './slork.sqlite');
+	$pdo = new PDO("sqlite:" . "${db_path}/slork.sqlite");
 } catch (PDOException $e) {
 } catch (PDOException $e) {
 	// handle the exception here
 	// handle the exception here
 }
 }
@@ -83,7 +83,7 @@ HTML;
 		--AND player != ?
 		--AND player != ?
 SQL;
 SQL;
 	$stmt = $pdo->prepare($query);
 	$stmt = $pdo->prepare($query);
-	$stmt->execute([$maintainer[0]]);
+	$stmt->execute( [$maintainer[0]] );
 	$rows = $stmt->fetchAll();
 	$rows = $stmt->fetchAll();
 	/*
 	/*
 	print("<pre>");
 	print("<pre>");