RE: [PHP] How do i replace table names?

From: Date: Mon, 03 Nov 2003 14:51:24 +0000
Subject: RE: [PHP] How do i replace table names?
Groups: php.general 
Request: Send a blank email to php-general+get-168388@lists.php.net to get a copy of this message
[snip] I want to replace something like this: $sql = "CREATE TABLE bas_table ( )"; With this: "CREATE TABLE hugo_table ( )"; And do the same for INSERT INTO... How do i do this? [/snip] Top of the morning to you Bas! I have a couple of questions for you. 1. Have you read <em>any</em> of the manual? 2. Are you subscribed to the MySQL list? All queries are run in the same way. If you have permissions in the database you can do this (for example); $sqlInsert = "INSERT INTO tableBAS (php, mysql) ": $sqlInsert .= "VALUES ('knowledge from having read PHP manual', "; $sqlInsert .= "'knowledge from having read MySQL manual') "; $dbInsert = mysql_query($sqlInsert, $connectionInformation); HTH!

« previous php.general (#168388) next »