“Daten einfügen” Code-Antworten

Daten einfügen

<?php
include_once 'database.php';
if(isset($_POST['save']))
{	 
	 $first_name = $_POST['first_name'];
	 $last_name = $_POST['last_name'];
	 $city_name = $_POST['city_name'];
	 $email = $_POST['email'];
	 $sql = "INSERT INTO employee (first_name,last_name,city_name,email)
	 VALUES ('$first_name','$last_name','$city_name','$email')";
	 if (mysqli_query($conn, $sql)) {
		echo "New record created successfully !";
	 } else {
		echo "Error: " . $sql . "
" . mysqli_error($conn);
	 }
	 mysqli_close($conn);
}
?>
Bayscode

In SQL einfügen

INSERT INTO tableName
VALUES (‘anydata’, ‘anydata’, ‘anydata’, ‘anydata’, NULL,
NULL);
naly moslih

einfügen in

Connect.UpdateQuery("insert into carte values ("+USER_cartenum.Text+", '"+user_RIB.Text+"', '"+USER_dateexpiration.Text+"')", db);
            Connect.UpdateQuery("insert into Account values ("+USER_nacc.Text+", "+USER_balance.Text+", 5, "+ USER_cartenum.Text + ")", db);
        
Witty Warbler

Daten einfügen

INSERT INTO table (a, b, c) VALUES (1,2,3)

INSERT INTO table SET a=1, b=2, c=3
Silly Swiftlet

Ähnliche Antworten wie “Daten einfügen”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen