mysql - Check to see if an ID exists in a database -


When an ID number is given, I want to see if it exists in the database or not. If the ID is received then the truth will return, and if not, then return the wrong.

My knowledge of MySQL is very low, but I'm assuming that it might be something to do with the COUNT (*) function? $ id = $ id

  Select table from id 

get fancy is not needed. Being present with Subqueries is likely to generate poor performance only, but I am happy if I have been shown otherwise.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -