The problem with the SELECT statement as I have used it thus far is that it will automatically retrieve every record. While this isn’t a big issue when dealing with a few rows of information, it will greatly hinder the performance of your database as the number of records grows. To improve the efficiency of your SELECT statements, there are different conditionals you can use in an almost limitless number of combinations. These conditionals use the SQL term WHERE and are written much like you’d write a conditional in PHP.
SELECT * FROM tablename WHERE column = 'value'; SELECT email FROM users WHERE last_name = 'Lennon'; SELECT name FROM people WHERE birth_date = '2003-01-26';
Table 4.6 lists the most common operators you ...