Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Kevin Naegele
10,868 PointsError 1349 in MYSQL.... what does it really mean?
I am trying to make a satbase for class and I always get this problem and never knew what it really means. I am getting it on this script of code.
DROP VIEW IF EXISTS pres_age_in_office;
create view pres_age_in_office as
select
president.first_name,
president.last_name,
birth,
pres_id,
'term start date'
from
pres_term
inner join
president
inner join
pres_term ON president.pres_id = pres_term.pres_id,
select
president.birth and 'term start date',
timestampdiff(YEAR,
birth,
'term start date') AS age,
orderby age;
It says something about the view. But i have rewrote this many times in slight differences.
2 Answers

Andrew Shook
31,709 PointsI'm not a MySQL expert, but I do believe that you aren't allowed to make subqueries in the from clause of a view.

Kevin Naegele
10,868 PointsI have gotten timestampdiff work in anther view..... so it works, but I am having a fail through the inner join.