Basically just do a a php script the sends the sql "show tables";
Then do a strchr() to see if "a" is the first letter in the resuts and if so do a delete table. Just yo play safe do a dump of your db first. Cheers, Mike *********** REPLY SEPARATOR *********** On 29/12/2002 at 7:57 PM Steve Buehler wrote: >I have researched this and can't find an answer. Maybe I am just looking >in the wrong places or not putting the correct keywords into the search >engines. So any help would be greatly appreciated. I am using MySQL with >PHP. > I have some PHP scripts that create tables in a database that are meant >to >be temporary but can't actually create "TEMPORARY" tables to do the >job. That isn't the problem in itself. The problem is that sometimes if >the script is stopped prematurely, it doesn't get to the drop table >function in it. All of the tables that are created for this start with an >"a" and follow with a random number. What I need to do is to create a >script that I can run that will delete all tables that start with an "a" >in >the database. Again, since the table name is randomly generated except >for >the starting "a", I will need the script to find them and drop them. > Has anybody done this before? I would sure appreciate some help here. > >Thanks >Steve > > >-- >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. >ow3 > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php