I'm developing an application in which users can send private message to each other.
Assume that a user want to send a message to users David , jack, John
. Something that is clear I must validate this recipients and check if they exist in the users
table.
but I don't have a clear scenario to do this job.
Should I prepare a query like:
select user form users where user_name=David OR user_name=Jack OR user_name=John
Then if row count was 3 let the user send his message and if not drop the action?