Here's a great little query to get the next auto increment id. It's better than grabbing the last id and incrementing it because entries may have been deleted that were added after the last id.
SELECT AUTO_INCREMENT AS id
FROM information_schema.tables
WHERE table_schema = 'mydatabase'
AND table_name = 'mytable';
Or for Joomla where I needed it:
$query = "SELECT AUTO_INCREMENT AS id FROM information_schema.tables WHERE table_schema = 'mydatabase' AND table_name = 'jos_content'";
$db->setQuery($query);
$rows = $db->loadObjectList();
$nextid = $rows[0]->id;