Miguel Cardenas <[EMAIL PROTECTED]> wrote on 09/19/2005 12:13:47 PM: > Hello > > > 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 > usage? > > Thanks for your patience :-) > > There are many versions of the manual. Check here for details:
http://dev.mysql.com/doc/ Shawn Green Database Administrator Unimin Corporation - Spruce Pine