PDA

View Full Version : wat is wrong with my query?


joyce
Sun 23rd Dec '01, 10:44pm
wat is wrong with my query?? what i'm trying to get is to select out the highest score for the month. the time_finish are stored as UNIX_TIMESTAMP.





$month = date(n);
$year = date(Y);

SELECT taker_name FROM quirex_record WHERE quiz_id = '$quiz_id' and month(UNIX_TIMESTAMP(time_finish)) = $month and year(UNIX_TIMESTAMP(time_finish)) = $year ORDER BY (no_correct/no_total) DESC, no_total DESC, (time_finish - time_begin) ASC, time_finish DESC LIMIT 1

binit
Mon 24th Dec '01, 5:24am
nothing wrong with your query.
I want to be your friend please send me your details. my email address is b_ranjan@indya.com. Yes i am 100% indian guy.