in reply to Problem with second MySQL Query

Have you considered putting a unique index on the officers field? That way the database will do the check for you, so you only have to try the insert.

Replies are listed 'Best First'.
Re^2: Problem with second MySQL Query
by greymoose (Beadle) on Oct 08, 2007 at 02:46 UTC
    Thanks rhesa,
    I haven't really looked into those aspects of using a database. I've had my hands full getting my head around Perl so I've stuck to the basics with MySQL. It sounds like a sensible approach though so I'll have to spend a bit more time brushing up on databases.
A reply falls below the community's threshold of quality. You may see it by logging in.