SA-MP Forums Archive
Check if there is an id - 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: Check if there is an id (/showthread.php?tid=510903)



Check if there is an id - TheSy - 03.05.2014

Good morning.

For a system of weed in SQL I need to check my table if id exists or not.

So I do not know how to check if the id exists or not.

Thank you!


Re: Check if there is an id - DobbysGamertag - 03.05.2014

set the `id` field to AUTO_INCREMENT. Then when you insert it will automatically go up by 1.

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_insert_id