Hi php experts, When i ran this code, this is the error i am getting "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 '`high`,`medium`,`low`) NOT NULL, subject VARCHAR(50) NOT NU". Kindly help.
<?php
include 'library/config.php';
include 'library/opendb.php';
$query="CREATE TABLE IF NOT EXISTS `_SUPPORT_DB_TABLE` (
id int NOT NULL AUTO_INCREMENT,
severity_level enum(`high`,`medium`,`low`) NOT NULL,
subject VARCHAR(50) NOT NULL,
description text,
submitted_by INT NOT NULL,
submitted_date DATETIME NOT NULL,
status enum(`open`, `closed`) NOT NULL,
PRIMARY KEY (id)
)";
mysql_query($query)or die(mysql_error());
include 'library/closedb.php';
?>
thanks,
Bob
Creating table error
Moderator: General Moderators
- novice4eva
- Forum Contributor
- Posts: 327
- Joined: Thu Mar 29, 2007 3:48 am
- Location: Nepal
Re: Creating table error
rather than using ` try '(single quote)