Guest User

Untitled

a guest
Jun 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. $sql = mysqli_query($con, "SELECT * FROM `tests` WHERE `VID` BETWEEN (SELECT MAX(`VID`) FROM `tests`)-6 AND (SELECT MAX(`VID`) FROM `tests`)-3 ORDER BY `SID` ASC, `VID` ASC;");
  2.  
  3. INSERT INTO `tests` (`ID`, `SID`, `VID`, `Text`) VALUES
  4. (1, 1, 1, 'test'),
  5. (2, 1, 2, 'test'),
  6. (3, 1, 3, 'test'),
  7. (4, 1, 4, 'test'),
  8. (5, 1, 5, 'test'),
  9. (6, 1, 6, 'test'),
  10. (7, 1, 7, 'test'),
  11. (8, 1, 8, 'test'),
  12. (9, 1, 9, 'test'),
  13. (10, 1, 10, 'test'),
  14. (11, 1, 11, 'test'),
  15. (12, 2, 1, 'test'),
  16. (13, 2, 2, 'test'),
  17. (14, 2, 3, 'test'),
  18. (15, 2, 4, 'test'),
  19. (16, 2, 5, 'test'),
  20. (17, 2, 6, 'test'),
  21. (18, 2, 7, 'test'),
  22. (19, 2, 8, 'test'),
  23. (20, 3, 1, 'test'),
  24. (21, 3, 2, 'test'),
  25. (22, 3, 3, 'test'),
  26. (23, 4, 1, 'test'),
  27. (24, 4, 2, 'test'),
  28. (25, 4, 3, 'test'),
  29. (26, 4, 4, 'test'),
  30. (27, 4, 5, 'test'),
  31. (28, 4, 6, 'test'),
  32. (29, 4, 7, 'test'),
  33. (30, 4, 8, 'test'),
  34. (31, 4, 9, 'test');
Add Comment
Please, Sign In to add comment