SyntaxFix
Write A Post
Hire A Developer
Questions
If there are spaces in the phone2 field from inadvertant data entry, you can ignore those records with the IFNULL and TRIM functions:
SELECT phone, phone2 FROM jewishyellow.users WHERE phone LIKE '813%' AND TRIM(IFNULL(phone2,'')) <> '';