Hi,
I have an existing database called aft. I want to make a new table in it called temp_frame_info. It will not, work. I keep getting "The query could not be executed!"
What am I doing wrong?
Thanks for any help you can offer.
DSGF
<HTML>
<HEAD>
<TITLE>Creating a Table</TITLE>
</HEAD>
<BODY>
<?php
// Set the variables for the database access:
$Host = "localhost";
$User = "root";
$Password = "xxxxxxxxxxxxxx";
$DBName = "aft";
$TableName = "temp_frame_info";
$Link = mysql_connect ($Host, $User, $Password);
$Query = "CREATE table $TableName (id INT NOT NULL AUTO_INCREMENT, photo_id VARCHAR, matt_t VARCHAR, matt_f VARCHAR, frame_id VARCHAR, frame_size VARCHAR, other_1 VARCHAR, other_2 VARCHAR, other_3 VARCHAR, PRIMARY KEY(id))";
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>