> Have you try :
> select count(*) from mytable where id=x and list=something
> if count ==0, it's like fetchrow==NULL from your solution, but without
> all the fuss about use_result();
No, but looks fine, I didn't know this usage of count(*) combined with
conditions, but now will use it :)
> Second solution :
> ALTER TABLE mytable ADD UNIQUE(id,list)
> which make a unique index on two field. inserting a duplicate value
> would give you back an error and let the table untouched.
Is it possible to do this during the creation of the table? my database is not
large, it has just some records (by now is being tested only), so I can
backup all data and build the table again.
Is there a MySQL manual I can download, apart of the one manual-split.tar.gz
found in mysql.com? so I would be able to find a more generic or advanced
Thanks for your patience :-)