当我尝试插入 javascript 链接时,我遇到了这个问题
Database error 1064: 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 'text/javascript'
src='http://www.domain.com/js/embed.js'></script>'' at line 3
除了那个 javascript 链接,它还接受文本和 youtube 嵌入代码。如何纠正这个问题?
这是桌子
CREATE TABLE IF NOT EXISTS `livedata` (
`livedata_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`livedata_cat_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`code` text NOT NULL,
PRIMARY KEY (`livedata_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=78 ;
我的 Htm 代码
<textarea class="text-input textarea" id="textarea" name="code" cols="100" rows="8"></textarea>