0

运行代码时出现以下错误,

INSERT INTO widgets( id, page, location, title, content, global) VALUES right(1, '/', '', 'Welcome to Animal Rights Pakistan', '

Animal Rights Pakistan 是一个协作编辑的 问答网站,旨在满足您的需求。

\r\n\r\n

它易于使用,无需注册!

\r\n\r\n

co/questions/ask">问一个问题

', 1);

错误:

#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 'right(1, '/', '', 'Welcome to Animal Rights Pakistan', '<p>Animal Rights Pakista' at line 1

提前致谢。

4

1 回答 1

1

尝试不带“正确”的值:

INSERT INTO widgets (id, page, location, title, content, global) 
VALUES(1, '/', '', 'Welcome to Animal Rights Pakistan', 
'Animal Rights Pakistan is a collaboratively edited question and answer site built to suit your needs.\r\n\r\n. It''s easy to use, with no registration required!', 1);

对于链接,您最好在表中添加另一个名为“reference”的文件,并在“a href='' ..”元素中回显它!

于 2013-04-07T10:26:13.083 回答