I actually was using mysql_error(), but with the wrong syntax. So, that is what that error was. Now However, I'm using it properly and got the following error:
BLOB/TEXT column 'private_id' used in key specification without a key length
I'm not sure, but I think I may still be using UNIQUE incorrectly. Here is my current code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
if($database_pointer = mysql_connect('localhost','my_name','my_pass')){
print("<p>Connection Sucessful</p>");
if(mysql_select_db('my_db')){
print("<p>and I found the right database.</p>");
$query = 'CREATE TABLE my_Table(login_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id VARCHAR(15) NOT NULL UNIQUE, password VARCHAR(15) NOT NULL, private_id BLOB NOT NULL UNIQUE, score INT NOT NULL, level INT NOT NULL)';
if (mysql_query("$query")){
print("<p>table created.</p>");
}
else{
print("<p>table creation failed.</p>");
$error = mysql_error();
echo $error;
}
}
else{
print("<p>But I couldn't find the right database.</p>");
}
}
else{
print("<p>Connection Failure</p>");
};
mysql_close($database_pointer);
?>
</body>
</html>
Also, when I add a length to the TEXT column private_id. I still get the error. Here is the revised private_id declaration:
private_id TEXT(35) NOT NULL UNIQUE
Thank you all for your patience and help. I really appreciate it.