if($new==0){
$post1 = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT 10");
}else{
$post1 = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT $new , $newId");
}
if($new==0){
$post1 = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT 1");
}else{
$post1 = mysql_query("SELECT * FROM posts ORDER BY id DESC LIMIT 1");
}
VM347:1 Uncaught SyntaxError: Unexpected token { in JSON at position 328
at JSON.parse ()
{"post":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u041a\u0430\u043a \u0443 \u0432\u0430\u0441 \u0434\u0435\u043b\u0430?<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\r\n\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430\u0430<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u044b\u044b\u044b\u044b\u044b<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u044b\u044b\u044b\u044b\u044b<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u044b\u044b\u044b\u044b<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u0446\u0446\u0446\u0446<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u0432\u0432\u044b\u044b\u044b\u044b\u044b\u044b\u044b\u044b\u044b<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u0432\u0432\u044b\u044b\u044b\u044b\u044b<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}{"post":"\u0432\u0432<\/div><\/div>","id":{"0":"49","id":"49","1":"8","poster_id":"8","2":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?","content":"\u041d\u043e\u0440\u043c, \u0441\u0430\u043c \u043a\u0430\u043a?"}}
На это:
Ошибка ищезает и загружаются новые новости но при загрузке на странице выводится только одна новость