Check if there is an id
#1

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!
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)