Originally posted by manavworld
View Post
Help with coding, it's for work
Collapse
X
-
i will try for avoid mistakes. Am realy very sorry for flooding here.Last edited by manavworld; 17.11.09, 10:18.
Leave a comment:
-
hi all i downloaded the lavalair script and i dont know the files there that has to do wit the database Pls i need help. If any one can give me a little guide on how to go about the database in my control panel in http://freehostia.com . Thanks to all.
Leave a comment:
-
Yes it is multiple choise form gumsOriginally posted by GumSlone View Postare the answers for exam questions in multiple choise form?
because if they are not then youll need a human to check if the answer is correct.
i would use a different tables for questions and the possible answers, and you should take a look at some other existing online exam forms, how they were done.
Leave a comment:
-
ok if you would do this way its your choice, but i wouldnt do it like thisOriginally posted by rukiya View PostGumslone Its easy like this
INSERT INTO `answers` VALUES (1,1,'0');
INSERT INTO `answers` VALUES (2,2,'a');
INSERT INTO `answers` VALUES (3,2,'c');
I would insert the correct answers only in the table.
if its true false answe then for true value=1 and false=0
question 1
student answered true=1 but in the table its false=0
question 2
student answered a,d but in the table its a,c
Its really a easy sql thing.
Leave a comment:
-
Gumslone Its easy like thisOriginally posted by GumSlone View Postand how will you know if the answer is correct?
you need to add additional row,
eg. correct = true or correct = false
INSERT INTO `answers` VALUES (1,1,'0');
INSERT INTO `answers` VALUES (2,2,'a');
INSERT INTO `answers` VALUES (3,2,'c');
I would insert the correct answers only in the table.
if its true false answe then for true value=1 and false=0
question 1
student answered true=1 but in the table its false=0
question 2
student answered a,d but in the table its a,c
Its really a easy sql thing.
And subzero I know what type of stupid coding you know, noob,you 1st learn how to write english correctly.Last edited by rukiya; 28.03.09, 12:54.
Leave a comment:
-
the answer char(1)?Originally posted by subzero View Posthe going around thinks a big shot lol
Yeah we all where a leaner once but when it comes to newbies like him always thinks big
lol i also found a error with his sql but i keep to my self with this lol

ok it should be text or varchar(255)
Leave a comment:
-
he going around thinks a big shot lol
Yeah we all where a leaner once but when it comes to newbies like him always thinks big
lol i also found a error with his sql but i keep to my self with this lol
Leave a comment:
-
Gum dont brofther to tech rukiya how to do things right lol he a noob bro:D
Leave a comment:
-
and how will you know if the answer is correct?Originally posted by rukiya View PostOk then
PHP Code:CREATE TABLE `answers` (
`id` int(10) NOT NULL auto_increment PRIMARY KEY,
`questionid` int(10) NOT NULL ,
`answer` char(1) NOT NULL default '',
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
you need to add additional row,
eg. correct = true or correct = false
Leave a comment:
Leave a comment: