php
INSERT INTO
- 관리자 2022.04.26 MySQLi Extension 인기
-
- 7,189
- 0
$sql = "INSERT INTO MyGuests (firstname, lastname, email)
VALUES ('John', 'Doe', 'john@example.com')";
if ($mysqli->query($sql) === TRUE) {
//if (mysqli_query($mysqli, $sql)) {
//Get ID of The Last Inserted Record
$last_id = $mysqli->insert_id;
//$last_id = mysqli_insert_id($mysqli);
echo $last_id;
} else {
echo $mysqli->error;
}
- 이전글Insert Multiple2022.04.26
- 다음글Create Table2022.04.26
댓글목록
등록된 댓글이 없습니다.