> // check if entry already exists
> SELECT COUNT(*) FROM tablename WHERE [cond]
You may want to try this instead:
select exists(select * from tablename where [cond])
which should be faster than count(*). You'll get back a
boolean value, though, not an integer.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346