Page 1 of 1

Erorr! In Quiz Install

Posted: Thu Nov 22, 2007 9:44 am
by bIgEr
CREATE TABLE phpbb_quiz_statistics ( `stats_id` int(5) NOT NULL default '', `quiz_id` int(10) NOT NULL default '', `user_id` int(10) NOT NULL default '', `stats_correct` INT(5) NOT NULL default '0', `stats_incorrect` INT(5) NOT NULL default '0', `stats_percentage` INT(3) NOT NULL default '0');


I have this error.

Posted: Thu Nov 22, 2007 9:44 am
by bIgEr
SQL query:

CREATE TABLE phpbb_quiz_statistics(

`stats_id` int( 5 ) NOT NULL default '',
`quiz_id` int( 10 ) NOT NULL default '',
`user_id` int( 10 ) NOT NULL default '',
`stats_correct` INT( 5 ) NOT NULL default '0',
`stats_incorrect` INT( 5 ) NOT NULL default '0',
`stats_percentage` INT( 3 ) NOT NULL default '0'
)

MySQL said:

#1067 - Invalid default value for 'stats_id'

While i try manual

Posted: Thu Nov 22, 2007 9:58 am
by bIgEr
Second Erorr.

Query 17 did not execute correctly

DEBUG MODE

SQL Error : 1054 Unknown column 'user_points' in 'field list'

UPDATE phpbb_config SET config_value = user_points WHERE config_name = 'Quiz_Cash_Currency'

Line : 84
File : admin_quiz.php


2 Erorrs :(

Posted: Thu Nov 22, 2007 1:27 pm
by moongirl
Coding is not my forte but...Google is my friend :wink:

I searched for...
Query 17 did not execute correctly
http://www.google.com/search?hl=en&q=Qu ... arch&meta=

The first result would appear to be what you are looking for...

Posted: Fri Nov 23, 2007 4:46 am
by battye
Yep, that's right.

I have just updated the sticky to have a link as well, because a few people have asked this.
I get the error "Query 17 did not execute correctly". Help.
This is very easy to fix. It is just a small bug in admin_quiz.php. Replace the current admin_quiz.php file with the file found at http://forums.cricketmx.com/viewtopic.php?p=57367#57367 and you will not get error.

Posted: Fri Nov 23, 2007 3:12 pm
by bIgEr
CREATE TABLE phpbb_quiz_statistics ( `stats_id` int(5) NOT NULL default '', `quiz_id` int(10) NOT NULL default '', `user_id` int(10) NOT NULL default '', `stats_correct` INT(5) NOT NULL default '0', `stats_incorrect` INT(5) NOT NULL default '0', `stats_percentage` INT(3) NOT NULL default '0');


You didn't answer this one.

that's in database erorr

Posted: Fri Nov 23, 2007 3:19 pm
by bIgEr
DEBUG MODE

SQL Error : 1146 Table 'ecmekoh_portal.phpbb_quiz_statistics' doesn't exist

SELECT stats_id FROM phpbb_quiz_statistics ORDER BY stats_id DESC LIMIT 1

Line : 31
File : functions_quiz.php


Comes with error.
I know why comes see post 1 :)

Posted: Fri Nov 23, 2007 3:46 pm
by battye
Do you use MySQL?

Posted: Sat Nov 24, 2007 1:38 am
by bIgEr
Yes i'm using MYSQL.

Something wrong with `stats_id` as i see

Posted: Sat Nov 24, 2007 2:12 am
by battye
I vaguely remember fixing this a few years ago.

Try:

Code: Select all

CREATE TABLE phpbb_quiz_statistics ( `stats_id` int(5) NOT NULL default '0', `quiz_id` int(10) NOT NULL default '0', `user_id` int(10) NOT NULL default '0', `stats_correct` INT(5) NOT NULL default '0', `stats_incorrect` INT(5) NOT NULL default '0', `stats_percentage` INT(3) NOT NULL default '0'); 
Does that work?

Posted: Sat Nov 24, 2007 8:54 am
by bIgEr
Your SQL query has been executed successfully (Query took 0.0111 sec)


Thank You :)

Posted: Sat Nov 24, 2007 8:55 am
by battye
No worries! :mrgreen:

Posted: Sat Nov 24, 2007 8:56 am
by bIgEr
Quiz Results

Correct Answers: 5 Incorrect Answers: 0

100%
You took 0 minutes, 5 seconds


Now works great .

Thanks again .. And thanks for this MOD