Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delete from table where id not in (
- select id from table
- order by id desc
- limit 50
- )
- SELECT unixTime FROM entries ORDER BY unixTime DESC LIMIT 49, 1;
- DELETE FROM entries WHERE unixTime < $sqlResult;
- SELECT timestampcol FROM table ORDER BY timestampcol DESC LIMIT 49,1;
- DELETE FROM table WHERE timestampcol < ( SELECT timestampcol FROM table ORDER BY timestampcol DSEC LIMIT 49,1 )
- DELETE FROM _table_
- WHERE _date_ NOT IN (SELECT _date_ FROM _table_ ORDER BY _date_ DESC LIMIT 50)
Add Comment
Please, Sign In to add comment