wstaw do
INSERT INTO table1 ( column1, column2 )
SELECT col1, col2
FROM table2
Jargs
INSERT INTO table1 ( column1, column2 )
SELECT col1, col2
FROM table2
INSERT INTO table2
SELECT * FROM table1
WHERE condition;
$sql = "INSERT INTO table_name('arg1, 'arg2', ...) VALUES ('value1,
value2, ...)'";
<?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);
}
?>
insert into cd.facilities values (9, 'Spa', 20, 30, 100000, 800);
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);