Hi all -
What is the best way to test the result set of a query for emptiness.
The situation is basically this:
I want to add a record to a MySQL table. I want to check if a record exists for a given id #.
I set up a statement which says:
if the result of a query is empty, the id # doesn't exist, therefore do something to add a new record.
if the result of the query is not empty, the id # does exist so do something else to add a new record.
I'm having trouble testing whether the result of the query is empty so I can't set up the decision structure properly.
I'd appreciate advice on how to approach the situation. If this is not a clear enough explanation I can flesh out the details to give more context.
Thanks,
Kris