$currentdate = date("Y-m-d");
$lastweekdate = date("Y-m-d", strtotime("-6 days"));
$querytopscoreofweek =
"SELECT * FROM fb_user WHERE last_date".
" BETWEEN $lastweekdate AND $currentdate ORDER BY oldscore DESC LIMIT 0,10";
i have field name last_date in this format $currentdate = date("Y-m-d"); i want to execute the above query i want it to return all the users of last week and mean between $lastweekdate and $currentdate and which has also old_score greater in descending order and only 10 users,BUT THE PROBLEM IS THAT IT IS NOT 开发者_运维技巧RETURNING ANY THING ANY HINT PLZ
SELECT *
FROM fb_user
WHERE last_date BETWEEN curdate() AND curdate() - interval 6 day
ORDER BY oldscore DESC LIMIT 10
精彩评论