0

news.time を年に設定するには? 2012年を見つけたいです。

SELECT
    news.id, 
    news.Categoryid, 
    news.newsid, 
    news.Languageid, 
    news.createtime, 
    news.tags, 
    news.topic, 
    news.sub_topic, 
    news.[time], 
    news.content_s, 
    [Language].Languagename, 
    Category.Categorysubid
FROM
    (
        news 
        INNER JOIN
        [Language] 
            ON news.Languageid = [Language].Languageid
    ), Category

このコードを試しましたが、うまくいきません:

SELECT
    news.id, 
    news.Categoryid, 
    news.newsid, 
    news.Languageid, 
    news.createtime, 
    news.tags, 
    news.topic, 
    news.sub_topic, 
    news.[time], 
    news.content_s, 
    [Language].Languagename, 
    Category.Categorysubid
FROM 
    (
        news 
        INNER JOIN
        [Language] 
            ON news.Languageid = [Language].Languageid
    ), Category
WHERE ( YEAR(news.[time]) = YEAR(?) )
4

1 に答える 1