Re: Temporary table name
| From: | Rosen | Date: | Fri, 16 Jul 2004 22:44:06 +0000 |
| Subject: | Re: Temporary table name | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35322@lists.php.net to get a copy of this message | ||
Thanks,
But is there a way to do this without additional table in which to store the
names of created temporary tables ?
Thanks,
Rosen
"Tim Van Wassenhove" <euki@pi.be> wrote in message
news:20040716222541.99262.qmail@pb1.pair.com...
> 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>