$.ajax({
url: "notifications.php",
dataType: "json",
success: function(responseJSON) {
if (responseJSON.length > 0) {
document.title = document.title.replace(/^(?:\(\d+\))?/, "(" + responseJSON.length + ") ")
for (var i=0; i<10; i++) {
console.log(responseJSON[i].date_notify')
}
}
}, error : function(x) {
console.log(x.responseText)
}
})
의 'date_notify'내가 가지고있는이 오류를 속성을 읽을 수 없습니다 10 가지 결과를 원한다 ... 내 SQL 부분에 LIMIT 쿼리. 내 검색어는 여기자바 스크립트 catch되지 않은 형식 오류가 : 크롬에서 정의되지 않은
SELECT users.lastname, users.firstname, users.screenname, notifications.notify_id,
notifications.tagged_by, notifications.user_id, notifications.post_id,
notifications.type, notifications.action, notifications.date_notify,
notifications.notify_id
FROM website.users users INNER JOIN website.notifications notifications
ON (users.user_id = notifications.user_id)
WHERE notifications.user_id = ? and notifications.action = ?
ORDER BY notifications.notify_id DESC
//LIMIT 10
이 방법을 변경하는 방법이 있습니까?
대단합니다! 고마워 형제는 그걸 몰랐어. –