neprasa Posted February 22, 2007 Report Share Posted February 22, 2007 ka uzrakstit lai mysql saglaba tikai 100 jaunakas cata zinas bet veco dzes aara , tas notiktos ta ka pievieno 101 zinu, ta tiek dzesta 1.(vecaakaa), un automatiski ta 101 ir 100 Link to comment Share on other sites More sharing options...
andrisp Posted February 22, 2007 Report Share Posted February 22, 2007 Nezinu vai pareizi uzrakstīju, bet meibī strādā. Lai strādātu (ja vispār strādā :) jābūt unikālam laukam (int, auto_increment). DELETE FROM `t` WHERE id < (SELECT id FROM `t` ORDER BY id DESC LIMIT 100, 1) Link to comment Share on other sites More sharing options...
Recommended Posts