I have sent the following SQL code and received the following error, but am not sure what is wrong with my syntax. Does anyone have any idea?
$sql="CREATE TABLE some(
answer_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
answer_time INT(10) UNSIGNED,
user_id INT(10) UNSIGNED,
option INT(1) UNSIGNED,
gender VARCHAR(6),
age INT(3) UNSIGNED
)";
$result=$conn->query($sql);
if($result){
echo "success";
}else{
echo $conn->error;
exit;
}
and the error was :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option INT(1), gender VARCHAR(6), age INT(3) )' at line 5