SELECT book_id FROM pd WHERE isbn='123456789' and book_name='"中國"與"PHP粉絲網(wǎng)"';
這種情況下,book_name對應(yīng)的字符串是沒有問題的,sql語句沒有語法問題,但是看下面一條語句:sql中,insert into yourTable(f1,f2) values(100,'abc') SELECT book_id FROM pd WHERE isbn='123456789' and book_name='LET'S GO!PHP粉絲網(wǎng)';
報異常:You have an error in your SQL syntax;--phpfensi.com