mySQL error: #1248 – Every derived table must have its own alias

Well, as the error says, you have to name every derived table. For instance

(SELECT   
    member_id,
    email
FROM exp_members
WHERE member_id = exp_channel_titles.author_id)

Is a derived table. Add a name like so:

(SELECT   
    member_id,
    email
FROM exp_members
WHERE member_id = exp_channel_titles.author_id) tempTableNameGoesHere

(I think I’m sure there is no need for an as between the bracket and the name, but I suppose you can try it, or look it up from here 😉 )

Your follow-up question (how long are we going to do this? 🙂 )

 WHERE title LIKE %Member% 

should be

WHERE title LIKE '%Member%'

Leave a Comment