lzkz168 发表于 2009-5-11 11:27:01

vus520哥哥...用了你的自动发布文章程序出现这种问题!~~~

<?php
/*
Page: /new.php?no=20&order=rand
Error: 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 'randlimit 20' at line 1 <br />Error sql: <font color='red'>SELECT id FROM `dede_archives` where arcrank ='-1'   order by id randlimit 20 ;</font>
*/
?>
<?php
/*
Page: /new.php?no=20&order=rand
Error: 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 'randlimit 20' at line 1 <br />Error sql: <font color='red'>SELECT id FROM `dede_archives` where arcrank ='-1'   order by id randlimit 20 ;</font>
*/
?>
<?php
/*
Page: /new.php?no=20&order=rand
Error: 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 'randlimit 20' at line 1 <br />Error sql: <font color='red'>SELECT id FROM `dede_archives` where arcrank ='-1'   order by id randlimit 20 ;</font>
*/
?>
<?php
/*
Page: /new.php?no=50&order=rand
Error: 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 'randlimit 50' at line 1 <br />Error sql: <font color='red'>SELECT id FROM `dede_archives` where arcrank ='-1'   order by id randlimit 50 ;</font>
*/
?>

俺不懂SQL...vus520哥哥能说下是什么原因吗???ali55ls

ghostscat 发表于 2009-5-11 11:40:12

语法错误

lzkz168 发表于 2009-5-11 11:43:52

语法错误
ghostscat 发表于 2009-5-11 11:40 http://bbs.locoy.com/images/common/back.gif

大哥...能告诉我解决办法吗?

vus520 发表于 2009-5-13 17:48:56

这是Mysql的语法错误,需要把SQL语句的rand改成rand()
页: [1]
查看完整版本: vus520哥哥...用了你的自动发布文章程序出现这种问题!~~~