added try catch

This commit is contained in:
2025-05-29 23:53:44 +02:00
parent 47c0d2c0d8
commit 27cce0dae6
+5 -1
View File
@@ -24,8 +24,8 @@ $currency_currency = $_POST["currency_currency"];
$creator;
$success = true;
try {
$creatorResult = $furatalog->query("SELECT * FROM `creator` WHERE `jinxxy_url`=\"" . $creator_jinxxyURL . "\";");
if ($creatorResult->num_rows == 0) {
$furatalog->query("INSERT INTO `creator`(`name`, `pb_url`, `jinxxy_url`) VALUES ('" . $creator_name . "','" . $creator_pb . "','" . $creator_jinxxyURL . "')");
@@ -35,6 +35,10 @@ if ($creatorResult->num_rows == 0) {
} else {
$creator = $creatorResult->fetch_assoc();
}
} catch (Exception $e) {
echo "cannot get or create creator";
die();
}
$contentResult = $furatalog->query("SELECT * FROM `content` WHERE `url`=\"" . $content_url . "\";");