Page 3 of 12

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 4:57 pm
by subvertbeats
battye wrote:Alright, maybe tomorrow I will bring up some multiple choice options (how about if it simply shows the options, and you can copy and paste the correct one in? That would be less hassle than getting radio boxes and the like working). Try and be online about 12 hours from now, or if not then about 18 hours from now... because this time for me is very late and I am logging off now :)
Well it does show the options, so I can already copy and paste.
The issue is I dont know if the funny chars is a display issue, or if thats the value stored in the DB.
battye wrote: Anyway, this is what else I had done - you can play around with this. In fact, please do - I'm hoping it will give a read out of the right/wrong answers... please let me know the results so I know what to fix/improve/change.
thanks again battye

Ill play around with the code.

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:00 pm
by battye
subvertbeats wrote:
battye wrote:Alright, maybe tomorrow I will bring up some multiple choice options (how about if it simply shows the options, and you can copy and paste the correct one in? That would be less hassle than getting radio boxes and the like working). Try and be online about 12 hours from now, or if not then about 18 hours from now... because this time for me is very late and I am logging off now :)
Well it does show the options, so I can already copy and paste.
The issue is I dont know if the funny chars is a display issue, or if thats the value stored in the DB.
It does? I just had another look at the file, I don't see anywhere where it displays the options. Just what the question is and a box for the correct answer to be typed into?

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:01 pm
by subvertbeats
Correct, but since the question is in the form of Team A vs Team B, and the only other option is a 'Draw', the end result is the same...

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:05 pm
by battye
Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:08 pm
by subvertbeats
battye wrote:Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?
Most of the day UK time. probably not 12 hrs from now, but 18 hrs from now I will be.,
Thanks again battye..

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:10 pm
by subvertbeats
On submission of the enter answers forum, the following SQL error is thrown.

Ill investigate
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 56
CALL: dbal_mysql->sql_query()

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:15 pm
by battye
subvertbeats wrote:
battye wrote:Okay... I'll do the multiple choice / radio box then. What time will you be online tomorrow?
Most of the day UK time. probably not 12 hrs from now, but 18 hrs from now I will be.,
Thanks again battye..
You're welcome, alright I will be online at that time too. I think if we work in real-time we could probably get this finished.
subvertbeats wrote:On submission of the enter answers forum, the following SQL error is thrown.

Ill investigate
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 56
CALL: dbal_mysql->sql_query()
On the page where you type in the answers, right click and view the page HTML source (view source)

Search for a line that says: <input type="hidden" value=

And paste that entire line here, I want to see what the contents are.

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:22 pm
by subvertbeats
Yep, that would be great if we could close out tomorrow

Code: Select all

<input type="hidden" value="4,5,6,7,8,9,10,11,12,13,14," name="questions" /><input type="submit" value="Submit" name="submit" />

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:25 pm
by battye
subvertbeats, congratulations on your new rank "Frequent Poster" :)

Open the file subvertbeats_quiz.php, FIND:

Code: Select all

				$question_id_set = explode(',', $question_id_hidden);
BEFORE, ADD:

Code: Select all

				$question_id_hidden = $_POST['questions'];
It is important that you add it before.

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:26 pm
by subvertbeats
Wonderful - Ill do that now....

No go sign off and relax! :)

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:30 pm
by subvertbeats
After that change the error persists (though shows line 57 of course due to the new line we added):
SQL ERROR [ mysql4 ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 [1064]

SQL

SELECT * FROM phpbb_quiz_statistics WHERE quiz_question_id =

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: control_quiz.php
LINE: 57
CALL: dbal_mysql->sql_query()

Code: Select all

<input type="hidden" value="4,5,6,7,8,9,10,11,12,13,14," name="questions" /><input type="submit" value="Submit" name="submit" />

(PS: In case you're wondering why 'control_quiz.php is referenced, thats what I called subvertbeats_quiz.php, and all references in the code are correctly updated)

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 5:47 pm
by battye
FIND

Code: Select all

				$question_id_hidden = $_POST['questions'];
AFTER ADD:

Code: Select all

				echo 'ECHOING: ' . $question_id_hidden;
Let me know what that outputs.

I am really going to bed now :mrgreen:

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 6:04 pm
by subvertbeats
battye wrote:
I am really going to bed now :mrgreen:
:D

Code: Select all

ECHOING: 4,5,6,7,8,9,10,11,12,13,14,
Warning: Cannot modify header information - headers already sent by (output started at /home/mmadent/public_html/foru/control_quiz.php:47) in /home/mmadent/public_html/foru/includes/functions.php on line 3543

Re: UQM 2.0 - Predictions Extensions

Posted: Thu Jan 21, 2010 6:10 pm
by subvertbeats
is the SQL error because of the trailing ','

?

Re: UQM 2.0 - Predictions Extensions

Posted: Fri Jan 22, 2010 7:50 am
by battye
No, what should be happening is the numbers are being split up. You can remove the echo 'ECHOING: ' . $question_id_hidden; now.

FIND

Code: Select all

				$question_id_hidden = $_POST['questions'];
				$question_id_set = explode(',', $question_id_hidden);
				$question_id_set_count = sizeof($question_id_set);
AFTER ADD:

Code: Select all

echo $question_id_set_count . '<br />';
echo $question_id_set[0];
Let me know what is output.