mysql get last monday code example
Example 1: mysql get last row
SELECT fields FROM table ORDER BY id DESC LIMIT 1;
Example 2: mysql last friday of current month
SELECT LAST_DAY(NOW()) - ((7 + WEEKDAY(LAST_DAY(NOW())) - 4) % 7);
SELECT fields FROM table ORDER BY id DESC LIMIT 1;
SELECT LAST_DAY(NOW()) - ((7 + WEEKDAY(LAST_DAY(NOW())) - 4) % 7);