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! While you're at it, check out some resources Treehouse students have shared here.

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

Development Tools

Kevin Naegele
Kevin Naegele
10,868 Points

Error 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
Andrew Shook
31,709 Points

I'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
Kevin Naegele
10,868 Points

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