Added comments to javascript code #215
@@ -7,6 +7,9 @@ function getOldChatMessages($user2ID) {
|
|||||||
$stmt = prepareQuery("
|
$stmt = prepareQuery("
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
|
FROM
|
||||||
|
(SELECT
|
||||||
|
*
|
||||||
FROM
|
FROM
|
||||||
`private_message`
|
`private_message`
|
||||||
WHERE
|
WHERE
|
||||||
@@ -15,9 +18,11 @@ function getOldChatMessages($user2ID) {
|
|||||||
`origin` = :user2 AND
|
`origin` = :user2 AND
|
||||||
`destination` = :user1
|
`destination` = :user1
|
||||||
ORDER BY
|
ORDER BY
|
||||||
`creationdate` ASC
|
`messageID` DESC
|
||||||
LIMIT
|
LIMIT
|
||||||
100
|
100) sub
|
||||||
|
ORDER BY
|
||||||
|
`messageID` ASC
|
||||||
");
|
");
|
||||||
|
|
||||||
$stmt->bindParam(":user1", $user1ID);
|
$stmt->bindParam(":user1", $user1ID);
|
||||||
@@ -76,7 +81,7 @@ function getNewChatMessages($lastID, $destination) {
|
|||||||
`destination` = :user1) AND
|
`destination` = :user1) AND
|
||||||
`messageID` > :lastID
|
`messageID` > :lastID
|
||||||
ORDER BY
|
ORDER BY
|
||||||
`creationdate` ASC
|
`messageID` ASC
|
||||||
");
|
");
|
||||||
|
|
||||||
$stmt->bindParam(':user1', $_SESSION["userID"]);
|
$stmt->bindParam(':user1', $_SESSION["userID"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user