How to Check if a Record Exists in SQL Database Table with PHP
Last Updated on Saturday, 12 January 2013 12:01 Written by Richi González Saturday, 12 January 2013 12:00
Hello,
Have you been in a situation where you need to check if either a phone number or a user, for example, exists in your database? When I didn’t know how to do that, I looked through several articles looking for the best and most efficient way of doing it until I found this one.
1. Let’s say we have a table called ‘users’ and it has two columns: id, name. This is our table:
Learn More
Tags: check, count(1), database, exists, fastest way, how to, if, optimization, php, record, select count, sql, table, with | Posted under Programming/Coding | No Comments

Recent Comments