akhil14741 / proquiz

Automatically exported from code.google.com/p/proquiz
0 stars 0 forks source link

Database Error #29

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a new general quiz (Some times it will work)
2.
3.

What is the expected output? What do you see instead?
I see a database error and not of the buttons like next work clock also shows 
00 

What version of the product are you using? On what operating system?
2.0.2

Please provide any additional information below.

Database Error
Message:    MySQL Query fail: INSERT INTO `quiz_qdb` (`instid`, `user`, 
`quiz_inst_ts`, `questions_arr`, `type_arr`, `cat_arr`, `total_qstn`, 
`total_time`, `created_by`) VALUES ('2701196738', '77197258', '1351914004', 
'2575693097|6860245823|8154543592|7156616525|6056492757|2912879594|5602513441|88
33723992|6276159233|7199939888|1197146046', 
'mcq|mcq|mcq|mcq|mcq|mcq|mcq|mcq|mcq|mcq|mcq', 'Computer Knowlage|Computer 
Knowlage|Computer Knowlage|Computer Knowlage|Computer Knowlage|Computer 
Knowlage|Computer Knowlage|Computer Knowlage|Computer Knowlage|Computer 
Knowlage|Computer Knowlage', '11', '15', 'system');
MySQL Error:    Duplicate entry '2147483647' for key 'instid'
Date:   Saturday, November 3, 2012 at 3:40:04 AM
Script: gquiz.php?action=pqsetup
Referer:    http://**/gquiz.php

Original issue reported on code.google.com by chris.j....@gmail.com on 3 Nov 2012 at 3:57

GoogleCodeExporter commented 8 years ago
 temporaly fix... find and delete: $nob = rand(1000000000,9999999999);
in Proquiz.class.php
use
$nob = rand(1000000000,2099999999);
instead.

Original comment by mallikar...@rightturn.co.in on 17 Nov 2012 at 7:36

GoogleCodeExporter commented 8 years ago

The number 2147483647 is the maximum value for a 32-bit signed integer in 
computing. Because 'instid' is of type INT, the above number is the maximum 
value you can have. Use BIGINT to go past this limitation (or use the temp fix)

Original comment by brasco...@gmail.com on 27 Feb 2014 at 9:17

GoogleCodeExporter commented 8 years ago
Oh, forgot to mention: in 'install/pq.sql', change

  `instid` int(10) DEFAULT NULL,

into

  `instid` bigint(10) DEFAULT NULL,

before installing Proquiz2

Original comment by brasco...@gmail.com on 27 Feb 2014 at 9:24