統(tǒng)計(jì)數(shù)量標(biāo)簽是不是不支持like查詢
{count action=sql sql='SELECT * FROM dr_1_share_category WHERE `dr_1_share_category`.`pid` IN (532) ' } {$debug_count}
這種的where條件就可以
{count action=sql sql='SELECT * FROM dr_1_share_category WHERE `dr_1_share_category`.`name` LIKE '%關(guān)鍵詞%' ' } {$debug_count}
或者
{count action=sql sql='SELECT * FROM dr_1_share_category WHERE name LIKE '%關(guān)鍵詞%' ' } {$debug_count}
這樣的where條件就報(bào)錯(cuò)了 ,好像 '%關(guān)鍵詞%' 沒傳遞過去一樣
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 '' at line 1
#SQL:SELECT count(*) as ct FROM dr_1_share_category where `dr_1_share_category`.`name` LIKE
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 '' at line 1
#SQL:SELECT count(*) as ct FROM dr_1_share_category WHERE name LIKE
是不是要添加轉(zhuǎn)意符,怎么弄?指點(diǎn)下
標(biāo)簽里面不能出現(xiàn)嵌套引號(hào)
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
{php $sql=urlencode("SELECT * FROM dr_1_share_category WHERE name LIKE '%關(guān)鍵詞%' ");}
{count action=sql sql=$sql} {$debug_count}
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
創(chuàng)始人辛苦了 ?? ?? ?? ??