您在這裡

sql錯誤訊息

請問以下是my sql版面太舊的關係嘛?
有加了views_slideshow和views_slideshow_imageflow模組,然後圖片無法動~
就出現以下訊息~
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND n.type = 'image' AND n.status = 1 ORDER BY n.sticky DESC, n.title ASC LIMIT ' at line 1 query: SELECT n.nid from node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid = AND n.type = 'image' AND n.status = 1 ORDER BY n.sticky DESC, n.title ASC LIMIT 0, 1 in D:\AppServ\www\mct\sites\all\modules\image\contrib\image_gallery\views\image_gallery_handler_field_gallery_cover.inc on line 162.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND n.type = 'image' AND n.status = 1 ORDER BY n.sticky DESC, n.title ASC LIMIT ' at line 1 query: SELECT n.nid from node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid = AND n.type = 'image' AND n.status = 1 ORDER BY n.sticky DESC, n.title ASC LIMIT 0, 1 in D:\AppServ\www\mct\sites\all\modules\image\contrib\image_gallery\views\image_gallery_handler_field_gallery_cover.inc on line 162.

附加檔案大小
Image icon error.PNG32.19 KB

看起來和 MySQL 版本沒有關係..

執行的 SQL 語法是︰
SELECT n.nid from node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid = AND n.type = 'image' AND n.status = 1 ORDER BY n.sticky DESC, n.title ASC LIMIT 0, 1

WHERE 後面,
「tn.tid = 」這段, " = " 後面沒有東西,錯誤訊息指的是這裡的語法錯誤。
這個語法到哪一個版本都是會出問題的。

至於 view ,沒深入研究,幫不上你的忙

我只是一個撰碼員,靠寫程式過活。
自從 Drupal 在 4.7 版的時候知道他的存在,但是後來跳去其它程式語言很久沒回來。
變成 D5 比較熟,D6 知道一點,D7 還在學的狀況…