Query error: 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 ') LIMIT 5' at line 1 - Invalid query: SELECT * FROM `xny_1_brand` WHERE `xny_1_brand`.`id` IN (169,90) AND `xny_1_brand`.`status` = 9 ORDER BY `xny_1_brand`.`id`) LIMIT 5
寫法不對吧
不是內(nèi)容關(guān)聯(lián) Related不起作用了,是里面有個SQL出錯了,解決辦法是自己在LIST里面指定排序方式。如果你查看后臺的錯誤日志就會發(fā)現(xiàn)SQL錯誤的地方,我的解決辦法是在Related調(diào)用頁面的LIST位置指定排序方式,如
{if $guanlian}
{list action=module module=dzzw IN_id=$guanlian order=id_asc pagesize=20 page=1 urlrule=/index.php?s=special&c=show&id=$id&page=[page]}
<li><span class="fr"><a href="javascript:;">{dr_date($t._updatetime, 'm-d')}</a></span><a title="{$t.title}" href="{$t.url}" class="list_title">{dr_keyword_highlight($t.title, $keyword)}</a></li>
{/list}
2樓咱倆的字段都寫的一樣,但是我加了排序前臺還是不顯示內(nèi)容,更新版本之前還是好好的正常顯示的
{if $guanlian} {list action=module module=brand order=id_asc IN_id=$guanlian} <div class="col-sm-2"> <div class="tile-container"> <div class="tile-thumbnail"> <a href="javascript:;"> <a href="{$t.url}" ><img src="{dr_thumb($t.thumb)}" width="100%"></a> </a> </div> <div class="tile-title"> <h5><a href="{$t.url}" class="title">{dr_strcut($t.title, 28)}</a></h5> </div> </div> </div> {/list} {/if}【凌財進】2樓
官方的演示是:
{if $nrglxw} {list action=module module=news IN_id=$nrglxw num=5 return=r} <p><a href="{$r.url}">{$r.title}</a></p> {/list} {else} 沒有關(guān)聯(lián) {/if}還是不行
【凌財進】2樓
Query error: 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 ') LIMIT 5' at line 1 - Invalid query: SELECT * FROM `xny_1_brand` WHERE `xny_1_brand`.`id` IN (169,90) AND `xny_1_brand`.`status` = 9 ORDER BY `xny_1_brand`.`id`) LIMIT 5