Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $q = "SELECT * FROM ( SELECT * FROM messages WHERE (user_from = ':userFrom' AND user_to = ':userTo') OR (user_from = ':userTo' AND user_to = ':userFrom') order by id desc limit 10 OFFSET :llm ) m1 order by id";
- $stmt = $db->prepare($q);
- $stmt->execute([':userFrom' => $_POST['user_from'], ':userTo' => $_POST['user_to'], ':llm' => $_POST['lastLoaded']]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement