Use `->prepare()` in package_installation_plugins.md
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Jan 2023 14:25:00 +0000 (15:25 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Jan 2023 14:25:26 +0000 (15:25 +0100)
docs/php/api/package_installation_plugins.md

index 5635b7881f688f1b49757984be9a7f0fe35d56e5..eac3b0033b9939bacca00815b8f0dcf6a77382fb 100644 (file)
@@ -105,13 +105,13 @@ You should make use of this data to remove the matching element from database.
 Example:
 ```php
 <?php
-$sql = "DELETE FROM    wcf".WCF_N."_".$this->tableName."
+$sql = "DELETE FROM    wcf1_{$this->tableName}
        WHERE           packageID = ?
                        AND environment = ?
                        AND eventName = ?
                        AND name = ?
                        AND templateName = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
+$statement = WCF::getDB()->prepare($sql);
 foreach ($items as $item) {
        $statement->execute([
                $this->installation->getPackageID(),