User Profile
Collapse
-
Thank you, just what I needed. There was still a problem, : is not a number. So now I replace : with . before I send it to database, and back again, when it comes back from database. -
Why does MySQL think that 8:32 is larger than 12:44?
I have a timebased highscore in my flashgame. I send the highscore from flash to database like this 00:00. Then I want to show the highscore with the fastest highscore first.
Code:ORDER BY time LIMIT 3
name 10:22
name 12:44
name 8:32
Why isn't 8:32 at the top? -
After a good nights sleep and some more research I found the solution:
INSERT INTO answer (answer, question_id) VALUES ('yes', (SELECT MAX(question_id ) FROM question));
It has taken me two days to find out!...Leave a comment:
-
I see I have a long way to go when I can't even explain my problem. I am not even sure I am looking for an UPDATE.
At first my poll worked just fine (I only have one question and you can only answer yes or no). Everytime the user answered yes, the function just inserted yes into the answer table: INSERT INTO answer(answer) VALUES('yes');
The problems started when I wanted to add a new question. To make sure that the new answers only...Leave a comment:
-
Can I update one table with values from another table?
I want to make a poll for my website(flash) where I can change the question from time to time. When I put up a new question, question_id in table1 will change (auto increment)
I am trying to make an updatefunction in php to work with amfphp and flash.
I have two tables:
1: Question: question_id, question.
2: Answer: answer_id, answer, question_id
question_id is foreign key in table 2. Can...
No activity results to display
Show More
Leave a comment: