Community discussion forum

How to check there is a particular record in database or not

  • 11 months ago
    In my project i have one option **Create Profile** i want to check if there is any record in database regarding this email id then give message "Profile created" otherwise Profile creation page is open how we check please give me sugession..... Regards Kausar
  • 11 months ago
    Hi, When doing this sort of work, i tend to use a scalar value that can be cast into an integer. Something like this: select count(email_id) from profile_table where email_id=:email_id; When running that, it will return you either zero for it doesn't exist, or 1+ for it does. HTH Simon C
  • 11 months ago
    Thanks

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!