Okay, so this could be a few things. Usually this means mysql is trying to access a row that you’ve already deleted. However I happened to get this error just by doing a select statement (and I hadn’t updated or deleted anything — go figure). I believe SQL didn’t like order in which I was selecting the fields. To diagnose the problem I broke the SQL down and gradually added the fields I’d selected back in piece by piece. Once I’d done this everything was fine and dandy.
When I was looking for help on this I found someone else who has having the same problem but the reason for their error message was because the database was in 65 compatability mode. Heh, sounds like a lot of things can give you this problem.