akky
Regular


Joined: Feb 18, 2006
Posts: 87
|
Posted:
Tue Mar 28, 2006 5:50 am |
|
I'm trying to install Nuke Quiz and getting errors when the script is running some sql to create the table strucure. My ISP is mysql5 and the sql is All that say BAD have errors and the OK ones complete fine.
MYSQL is not a strong point so any assistance would be appreciated.
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_config (notice int(2) default '0', comp_rules int(2) NOT NULL default '0', points int(2) NOT NULL default '0', userpoints int(3) NOT NULL default '0', scroll int(2) NOT NULL default '0', scrollh int(2) NOT NULL default '0', toplist int(4) NOT NULL default '0', adnotify int(2) NOT NULL default '0', comp int(2) NOT NULL default '0', compqid int(2) NOT NULL default '0', blocklist int(2) NOT NULL default '0', scdir varchar(10) NOT NULL default '', install int(2) NOT NULL default'', user_ques int(2) NOT NULL default'', user_help int(2) NOT NULL default'', version varchar(12) NOT NULL default '')");
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_quiz (qid int(6) NOT NULL auto_increment, sid int(6) NOT NULL default '0', active tinyint(1) NOT NULL default '0', compq int(2) NOT NULL default '0', prize_desc text NOT NULL default '', sponsor text NOT NULL default '', sscoreb int(2) NOT NULL default '0', title varchar(255) NOT NULL default '', emailadmin tinyint(1) NOT NULL default '0', random int(2) NOT NULL default '0', emailuser tinyint(1) NOT NULL default '0', limit_attempts tinyint(1) NOT NULL default '0', view_answers tinyint(1) NOT NULL default '0',expire datetime NOT NULL default '0000-00-00 00:00:00', hit_count int(11) NOT NULL default '0', points_total int(6) NOT NULL default'', admin_email varchar(255) NOT NULL default '', PRIMARY KEY (qid), KEY qid (qid))");
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_scoreboard (sbid int( NOT NULL auto_increment, ip varchar(20) NULL default '', starttime int(12) NOT NULL default '', endtime int(12) NOT NULL default '', username varchar(255) NULL default '', email varchar(255) NULL default '', qid int(11) NOT NULL default '0', score int(6) NOT NULL default '0', perc decimal(4,2) NOT NULL default '0.00', ttime varchar(20) NOT NULL default '', date varchar(10) NOT NULL default'', time varchar(10) NOT NULL default'', KEY qid (qid), PRIMARY KEY (sbid))");
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_compresults (cid int(10) NOT NULL auto_increment, ip varchar(20) NULL default '' , date varchar(10) NOT NULL default '', time varchar(10) NOT NULL default '', username varchar(255) default NULL, email varchar(255) default NULL, answer text NOT NULL default '', cqid int(2) NOT NULL default '', PRIMARY KEY(cid))");
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_league (nqlid int(3) NOT NULL auto_increment, username varchar(255) NOT NULL default '', email varchar(200) NOT NULL default '', count int(4) NOT NULL default '', score int(6) NOT NULL default '', average int(4) NOT NULL default '', total int(6) NOT NULL default '', perc decimal(4,2) NOT NULL default '', updated int(1) NOT NULL default '0', PRIMARY KEY (nqlid))");
BAD $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_subanswers (subquesid int(11) NOT NULL default '', optionText varchar(255) NOT NULL default '', orderid int(4) NOT NULL default '')");
OK $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_sections (sid int(6) NOT NULL auto_increment, secname varchar(50) NOT NULL default '', secdesc varchar(255) default NULL, secimage varchar(25) default NULL, PRIMARY KEY (sid))");
OK $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_questions (quesid int(11) NOT NULL auto_increment, question text NOT NULL, qid int(10) NOT NULL default '0', answer text NOT NULL, points int(5) NOT NULL default '1', qexplain text NOT NULL, image varchar(255) default NULL, PRIMARY KEY (quesid))");
OK $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_answers (quesid int(11) NOT NULL default '0', optionText varchar(255) NOT NULL default '', orderid int(4) NOT NULL default '0' )");
OK $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_compquestion (cqid int(5) NOT NULL auto_increment, ques text NOT NULL, image varchar(255) NOT NULL default '', answer text NOT NULL, prize_desc text NOT NULL, sponsor text NOT NULL default '', sponsor_image varchar(255) NOT NULL default '', hit_count int(6) NOT NULL default '0', enddate datetime NOT NULL default '0000-00-00 00:00:00', admin_email varchar(255) NOT NULL default '', PRIMARY KEY (cqid))");
OK $result = $db->sql_query("CREATE TABLE ".$prefix."_nquiz_subquestions (subquesid int(11) NOT NULL auto_increment, question text NOT NULL default '', answer text NOT NULL default '', qexplain text NOT NULL default '', submittedby varchar(255) NOT NULL default'', PRIMARY KEY (subquesid))");
TIA Akky |
|
|