RE: [PHP] How do i replace table names?
| From: | Jay Blanchard | Date: | Mon, 03 Nov 2003 15:20:50 +0000 |
| Subject: | RE: [PHP] How do i replace table names? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168393@lists.php.net to get a copy of this message | ||
[snip]
No, i mean to replace the names in the string... And then execute
them...
[snip]
*slaps forehead* Duh, just do it?
$sqlCreateTable = "CREATE TABLE
dumBas ( ";
$sqlCreateTable .= "ai int(11) NOT NULL AUTO_INCREMENT, ";
$sqlCreateTable .= "thing char(32) default NULL, ";
$sqlCreateTable .= "stuff char(16) default NULL, ";
$sqlCreateTable .= "PRIMARY KEY (ai), ";
$sqlCreateTable .= "KEY thing (thing) ";
$sqlCreateTable .= ") ";
$dbCreateTable = mysql_query($sqlCreateTable, $connectionStuff);