Jump to content


Photo

Delete E Limit


  • Faça o login para participar
1 reply to this topic

#1 windfall

windfall

    Novato no fórum

  • Usuários
  • 10 posts
  • Sexo:Masculino
  • Localidade:Rio

Posted 30/09/2011, 08:08

Bom dia,
estou com uma dúvida. Não consigo criar uma query que exclua todos os registros de uma tabela, EXCETO os últimos 20 (sempre deverá sobrar os 20 últimos).

Alguém teria idéia de como resolver isto?

Att.

Edição feita por: windfall, 30/09/2011, 08:08.


#2 silici0

silici0

    ?

  • Usuários
  • 902 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP
  • Interesses:PHP, MySQL, XHTML, CSS, AJAX, JavaScript, Objective-C, Python, Games ... #geek

Posted 30/09/2011, 12:00

Usa range com WHERE id BETWEEN (menor e maior )

Abraços
Procurando freelancer
***********************************************
Bachelor of Technology in Technology of Information, with great knowledge in Windows operating systems and Unix-Like (BSD, Ubuntu and Slackware), languages (PHP, JavaScript and MySQL), semantic (DHTML, Tableless, Ajax, MVC, OO) and analysis (manages projects based on PMI).
Developer in PHP, JAVA, Python, Objective-c MySQL, DHTML, CSS, JAVASCRIPT, JQUERY, JSON, SMARTY, MDB2, DOCTRINE, CAKEPHP. Linux desktop for work and MacOS. E-commerces, CRM and bussiness strategys
Love-me and be FREE use UniCes-Like .




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq