I am trying to get the last ID input that I query in MySQL Database. 

**Note:** The itemid is auto increment and of type integer.

In this example, I want to get the last item query, which is itemcode 13.

Here is the screenshot of the table:

![enter image description here](https://i.stack.imgur.com/jNokD.png)