Читать книгу Professional WordPress Plugin Development - Brad Williams - Страница 67
SQL Statements
ОглавлениеWhen writing SQL statements in WordPress to make a direct database call, always capitalize the SQL part of the statement. Most statements should be written on a single line, but it's OK to break the statement into multiple lines if the statement is complex.
SELECT ID FROM wp_users WHERE user_login = 'example'
Chapter 4, “Security and Performance,” covers how to create proper SQL statements in more detail.