Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
akky
Regular
Regular



Joined: Feb 18, 2006
Posts: 87

PostPosted: Tue Mar 28, 2006 5:50 am Reply with quote

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(Cool 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
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Mar 31, 2006 7:52 am Reply with quote

It would be helpful to have at least one of the error messages for one of the "BAD" statements.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
akky







PostPosted: Sat Apr 01, 2006 2:27 pm Reply with quote

thx for the reply but I worked it out and forget to mark the post solved . For some reason mysql did not appear to like

install int(2) NOT NULL default''

and all instances of type int that had NOT NULL and default''.

I changed to default'0' and it worked.

akky
 
montego







PostPosted: Sat Apr 01, 2006 2:49 pm Reply with quote

Excellent. Glad you figured it out.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©