Okay I know what i want to do, now i just have to figure out how to do it
INSERT INTO quack
SET fileid = ‘a81fe9158791bd510eb17fb4c1604608’,
description = ‘TEST’,
filename = ‘TEST’,
date = ‘2009-11-19’,
chapter = ‘O’,
verse = ( SELECT MAX( verse )
FROM quack
WHERE chapter = ‘O’ ) +1
The idea being, of course, to find the highest value of verse (which is integer type), and add 1 to it to find the correct insert point. MAX(verse) wont work by itself because each chapter has verses 0…n, and so MAX(verse) would pull the highest overall, not just within the chapter.
MySQL (PHPMyAdmin) throws this back at me: #1093 - You can’t specify target table ‘quack’ for update in FROM clause
…i’m not doing an update…