user2016
Grünschnabel
Hallo,
ich bekomme das einfach nicht hin.
Meine DB-Struktur sieht wie folgt aus:
Counter:
Wo steckt da der Fehler drin?
Vielen Dank im Voraus
ich bekomme das einfach nicht hin.
Meine DB-Struktur sieht wie folgt aus:
SQL:
CREATE TABLE IF NOT EXISTS `options` (
`option_name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`option_value` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
SQL:
INSERT INTO `options` (`option_name`, `option_value`) VALUES
('counter_digits', '0');
Counter:
PHP:
$pdo = new PDO( $db_server, $db_user, $db_password, $db_options );
$counting = $pdo->prepare("UPDATE options SET option_value = option_value + 1 WHERE counter_digits = ?");
$counting->execute(array(counter_digits));
Wo steckt da der Fehler drin?
Vielen Dank im Voraus
