聯(lián)系官方銷(xiāo)售客服
1835022288
028-61286886
<?php $old = "<script>[xss_clean](localStorage.getItem('depart'))</script>"; $sql = "SELECT name FROM sp_linkage_data_2 WHERE id =" .$old; echo $old; echo $sql; $query = urlencode('select * from sp_linkage_data_2 WHERE id ='.$old); ?> {sql sql='$query'} {$t.name} {/sql} {$debug}
提示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 '=34' 錯(cuò)誤
這個(gè)該如何調(diào)整?
單獨(dú)echo都是正確的, $old為 34, $sql 也是正確
$old需要是數(shù)字才行,轉(zhuǎn)換一下類(lèi)型
(以上回復(fù)內(nèi)容已被迅??蚣軇?chuàng)始人修改)