Hey! So I am trying to retrieve the highest ID value from my database, add 1, then insert that new value into a new row. I have the rest of my code working apart from this part, am I going about storing this wrong?
$id = mysql_query($con, "SELECT ticketID FROM tickets ORDER BY ticketID DESC LIMIT 0, 1");
$bookid = ($id + 1);
$query = mysqli_query($con, "INSERT INTO tickets (ticketID) VALUES
('$bookid')");