Unknown column 'a.Email Address' in 'field list' error MySQL
I have the error:
Unknown c开发者_C百科olumn 'a.Email Address' in 'field list in PHP from a database query.
Please can you tell me why it doesn't like the fact that I have a space between Email and Address, and how I can fix it.
Here's my full query:
SELECT f.*, a.*, a.Email Address, a.Avatar
FROM Following as f
JOIN Accounts as a ON f.followingUserID = a.id
WHERE followingUserID = '$acID'
Quote it:
a.`Email Address`
And avoid spaces (or dashes, or reserved words) in/as table/column names.
精彩评论