Gossamer Forum
Home : General : Databases and SQL :

Re: [Andy] Lower case to upper...

Quote Reply
Re: [Andy] Lower case to upper... In reply to
http://www.mysql.com/.../E/RENAME_TABLE.html

get the table names via dbi and use the regex

$loc = index($name, "_") + 1;
$replaced = substr($name, $loc);
$name = $name . ucfirst($replaced);
$sth = $sth->prepare("rename table $beforename TO $name");
$sth->execute();

Some of that is a bit poor, but I would appreciate it if anyone could give me ideas on how to improve that.
------------------
Dorg Hurgler Van Schongleur,
NordHein Van Resetelem, Belgium.
Eck SchekeBuugler Technologies.

Last edited by:

searchposts: Jun 3, 2002, 10:41 AM
Subject Author Views Date
Thread Lower case to upper... Andy 8839 Jun 3, 2002, 10:27 AM
Thread Re: [Andy] Lower case to upper...
VanSchongluer 8575 Jun 3, 2002, 10:40 AM
Post Re: [searchposts] Lower case to upper...
VanSchongluer 8514 Jun 3, 2002, 10:43 AM