I'm just started using PHP so maybe I'm doing something silly here, but for some reason I can't create an InnoDb table from within a PHP script. The same script can create a MYSIAM table just fine when "Type=MyISAM", but when the table type is "Type=InnoDb" then the query fails. MySQL.Err has not reported any errors. I'm using MySQL 3.23.42-max-nt with Apache on a Win2k box.
The same Create Table works fine for Type=InnoDb if run from the MySQL prompt but fails from the PHP script. I'm running the PHP script locally on a test machine. Here is the PHP script. <HTML> <HEAD> <TITLE>Creating a Table</TITLE> </HEAD> <BODY> <?php // Set the variables for the database access: $Host = "localhost"; $User = "Admin"; $Password = ""; $DBName = "PHPDB"; $TableName = "Feedback"; $Link = mysql_connect ($Host, $User, $Password); $Query = "CREATE table $TableName (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName TEXT, LastName TEXT, EmailAddress TEXT, Comments TEXT) Type=InnoDb"; // Type=MYISAM"; if (mysql_db_query ($DBName, $Query, $Link)) { print ("The query was successfully executed!<BR>\n"); } else { print ("The query could not be executed!<BR>\n"); } mysql_close ($Link); ?> </BODY> </HTML> Brent --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php