diff --git a/src/index.php b/src/index.php index 87a6ad7..1838318 100644 --- a/src/index.php +++ b/src/index.php @@ -83,7 +83,7 @@ if (!empty($_GET["action"])) { } else if ($action == "subscribe") { // ensure the current user can shop for that user first. - $stmt = $smarty->dbh()->prepare("SELECT pending FROM shoppers WHERE shopper = ? AND mayshopfor = ?"); + $stmt = $smarty->dbh()->prepare("SELECT pending FROM {$opt["table_prefix"]}shoppers WHERE shopper = ? AND mayshopfor = ?"); $stmt->bindParam(1, $userid, PDO::PARAM_INT); $stmt->bindValue(2, (int) $_GET["shoppee"], PDO::PARAM_INT); $stmt->execute();