SA-MP Forums Archive
Delete last row? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Delete last row? (/showthread.php?tid=610914)



Delete last row? - TracerX - 30.06.2016

removed


Re: Delete last row? - Vince - 30.06.2016

You get the primary key (i.e. usually the id) of that row and then you send a delete query.


Re: Delete last row? - TracerX - 30.06.2016

Can you show me an example please?


Re: Delete last row? - Stinged - 30.06.2016

Код:
DELETE FROM table_name ORDER BY field DESC LIMIT 1
Change the number after LIMIT if you want to delete more than 1 row.


Re: Delete last row? - TracerX - 01.07.2016

removed


Re: Delete last row? - DTV - 01.07.2016

You could just use gettime(); without hour, m, or s.