hi,
ein INSERT sieht bei mir momentan so aus:
Jetzt finde ich aber immer eher solche Beispiele:
Oder auch mal sowas:
Ich möchte einfach nur mal eben "Sicher" was in die Datenbank schreiben, aber dann gleich "Richtige" nur mit welcher Art ?
gruß Gianna
ein INSERT sieht bei mir momentan so aus:
PHP-Code:
$stmt = $db->prepare('INSERT INTO kategorie (titel, text) VALUES (:titel, :text)') ;
$stmt->execute(array(':titel' => $titel, ':text' => $text));
PHP-Code:
$sql = "INSERT INTO kategorie (titel, text) VALUES (:titel, :text)";
$stmt = $db->prepare($sql);
$stmt->bindParam(':titel', $_POST['titel'], PDO::PARAM_STR);
$stmt->bindParam(':text', $_POST['text'], PDO::PARAM_STR);
$stmt->execute();
PHP-Code:
$stmt->bindValue(':titel', $titel);
gruß Gianna
Kommentar