|
-
Jun 22nd, 2002, 03:56 AM
#1
Thread Starter
Fanatic Member
i seem to be bad at spelling, but...
... can anyone find a problem with this query ?
PHP Code:
mysql_query("create table GDB_poll (p_num int(11) not null,
type set(‘question’,’title’,’no_of_ques’,’option’,’result’) not null,
value tinyblob not null,
extra int(11))") or die ("<br>Error Creating Table 2. Possible reason: table already exists");
ECHO "$success | GDB_poll table created <br>\n";
i think it might be the 'set' thing, but i cant seem to get it working
-
Jun 22nd, 2002, 11:25 AM
#2
yeah I see a problem.
mysql_query("create table GDB_poll (p_num int(11) not null,
type set(‘question’,’title’,’no_of_ques’,’option’,’result’) not null, value tinyblob not null,
extra int(11))") or die ("<br>Error Creating Table 2. Possible reason: table already exists");
ECHO "$success | GDB_poll table created <br>\n";
can't have spaces in the name of the column (I don't think) and you have the name of the column as type set but what is after it? it should be text or varchar(100) or something.
and I think value is a mysql reserved word.
-
Jun 22nd, 2002, 11:32 AM
#3
ahh it is to early in the morning.
type is reserved for mysql, exchange type for the column name.
try this
PHP Code:
mysql_query("create table GDB_poll (p_num int(11) not null,
p_something set('question','title','no_of_ques','option','result') not null, p_value tinyblob not null,
extra int(11))") or die ("<br>Error Creating Table 2. Possible reason: table already exists");
ECHO "$success | GDB_poll table created <br>\n";
and why are you using ` instead of ' also I don't think this is what you are after but you can try it.
-
Jun 22nd, 2002, 05:14 PM
#4
Thread Starter
Fanatic Member
thanx scoutt, i'll give that a try the minute i have a chance
-
Jun 24th, 2002, 12:35 AM
#5
Thread Starter
Fanatic Member
well, it now works all i did was replace every ` with a ' , dont ask why they were like that in the first place
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|