Deletar Ultimos Registros De Uma Tabela
#2
Posted 19/02/2011, 06:37
mysql_query("delete from nome_tabela order by nome_do_campo asc limit 1,99 ");
Obs # limit: no script acima ele vai do registo 1 até o registo 99 e deixa o restante.
Obs # asc :no script acima ele procura os registos crescente Ex. 1.2.3.4.5... e ai vai.
Espero o ter ajudado amigo # estamos aqui para ajudar
impacto é que são válidas,e aplicadas nas nossas vidas.
9033 lab
#3
Posted 19/02/2011, 12:52
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '99' at line 1
Query:
delete from statistics where server = '4' order by id asc limit 1,99
#4
Posted 19/02/2011, 18:14
Onde é que você executa ou coloca o código acima ?
A mensagem de erro diz que há um erro na sintaxe do código.
Por favor se possível coloque o código fonte aqui no fórum .
Edição feita por: Leocarpo, 19/02/2011, 18:16.
impacto é que são válidas,e aplicadas nas nossas vidas.
9033 lab
#5
Posted 20/02/2011, 05:21
Dessa forma consegui executar:
delete from statistics where server = '4' order by id asc limit 99
Porem ele deleta 99 registros, e eu preciso mesmo é deletar os ultimos registros (mais antigos) e deixar apenas 100, e não deletar 100, e deixar os outros
Sera possivel isso em uma query ?
Agradeço!
#7
Posted 27/09/2017, 22:26
Levitra Why So Exspensive cialis What Is Cephalexin Used To Treat Viagra Costo Riesgos Del Propecia
How Much Is Viagra Without Insurance Acheter Kamagra Livraison 48h generic cialis Bentyl Internet Levitra Costo Confezione
#10
Posted 25/10/2017, 12:44
Doctor Who Prescribe Cialis Online Control Sex Pills Birth buy 10 mg levitra online Anafranil Mg Medicamentos Viagra
#12
Posted 07/11/2017, 13:02
Bactrim For Uti 3 Days Vivanza 20mg cialis Amoxil Amoxil Vs Wiki
#14
Posted 06/12/2017, 02:03
Cephalexin Mouth viagra online 5158.1 Where Can I Buy Macrobid Express Delivery Buy Isotretinoin Online
Syntolexin Levitra Working Time viagra online Ciprofloxacin Crystalluria
#15
Posted 09/02/2023, 14:28
viagra vs cialis The work we expected to do with the Space Station would go largely undone
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)