Re: Temporary table name

From: Date: Fri, 16 Jul 2004 22:25:41 +0000
Subject: Re: Temporary table name
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35320@lists.php.net to get a copy of this message
In article <20040716213419.55492.qmail@pb1.pair.com>, Rosen wrote: > Hi, > I need to create temporary table in mysql. And I generate random name - i.e. > "TMP21567". How can I check is this name already exist in database ? SELECT COUNT(*) AS count FROM temporary_table WHERE name='TMP21567'; Probably you'll want to make the name the primary key or at least unique. This way you save yourself from adding duplicate entries with the same name. -- Tim Van Wassenhove <http://home.mysth.be/~timvw>

« previous php.db (#35320) next »