connect_errno)
{
exit("Connection error : ".$conID->connect_error);
}
// Uncomment one of these three as appropriate
$query_Action = "INSERT INTO Persons (First_Name, Last_Name) VALUES ('Tom', 'Jones')";
// $query_Action = "DELETE FROM Persons WHERE Last_Name = 'Winters'";
// $query_Action = "UPDATE Persons SET Last_Name = 'Brookes' WHERE Last_Name = 'Brook'";
$conID->query($query_Action); // This executes the command
$query_Action_ID = $conID->insert_id; // This gets the new record ID for the Insert Command
$query = "SELECT First_Name, Last_Name FROM Persons ORDER BY First_Name";
$ObjResult = $conID->query($query);
if($ObjResult->num_rows > 0)
{
while($Get_A_Row = $ObjResult->fetch_assoc())
{
echo "
Employee : ".$Get_A_Row['First_Name']." ".$Get_A_Row['Last_Name']."\n";
}
echo "
Last inserted record ID is : ".$query_Action_ID."\n";
}
$conID->close();
?>