Last active
March 18, 2016 14:52
-
-
Save skyjia/a015006396fb5aaf08c9 to your computer and use it in GitHub Desktop.
Revisions
-
skyjia renamed this gist
Mar 18, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,4 @@ SELECT * FROM ( (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo WHERE fo.`@row_num_in_page` > 0 AND fo.`@row_num_in_page` <= @paging_size; -
skyjia revised this gist
Mar 18, 2016 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,18 +2,18 @@ SET @start_key=1005069; SET @paging_size = 20; SELECT * FROM ( SELECT (@row_num:=@row_num + 1) AS `@row_num`, (@row_num_in_page:=CASE WHEN f.id = @start_key THEN 0 WHEN @row_num_in_page>=0 THEN @row_num_in_page+1 ELSE -1 END) AS `@row_num_in_page`, f.* FROM fabula as f, (SELECT @row_num:=0) AS t, (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo -
skyjia revised this gist
Mar 18, 2016 . No changes.There are no files selected for viewing
-
skyjia revised this gist
Mar 18, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ SELECT * FROM ( FROM fabula as f, (SELECT @row_num:=0) AS t, (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo WHERE fo.`@row_num_in_page` > 0 AND fo.`@row_num_in_page` <= @paging_size; -
skyjia revised this gist
Mar 18, 2016 . No changes.There are no files selected for viewing
-
skyjia revised this gist
Mar 18, 2016 . No changes.There are no files selected for viewing
-
skyjia revised this gist
Mar 18, 2016 . No changes.There are no files selected for viewing
-
skyjia revised this gist
Mar 18, 2016 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,17 +4,17 @@ SET @paging_size = 20; SELECT * FROM ( SELECT (@row_num:=@row_num + 1) AS `@row_num`, (@row_num_in_page:=CASE WHEN f.id = @start_key THEN 0 WHEN @row_num_in_page>=0 THEN @row_num_in_page+1 ELSE -1 END) AS `@row_num_in_page`, f.* FROM fabula as f, (SELECT @row_num:=0) AS t, (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo WHERE fo.`@row_num_in_page` > 0 AND fo.`@row_num_in_page` <= @paging_size; -
skyjia revised this gist
Mar 18, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,15 +6,15 @@ SELECT * FROM ( (@row_num:=@row_num + 1) AS `@row_num`, @row_num_in_page:=CASE WHEN f.id = @start_key THEN 0 WHEN @row_num_in_page>=0 THEN @row_num_in_page+1 ELSE -1 END AS `@row_num_in_page`, f.* FROM fabula as f, (SELECT @row_num:=0) AS t, (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo WHERE fo.`@row_num_in_page` > 0 AND fo.`@row_num_in_page` <= @paging_size; -
skyjia created this gist
Mar 18, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ SET @start_key=1005069; SET @paging_size = 20; SELECT * FROM ( SELECT (@row_num:=@row_num + 1) AS `@row_num`, @row_num_in_page:=CASE WHEN f.id = @start_key THEN 0 WHEN @row_num_in_page>=0 THEN @row_num_in_page+1 ELSE -1 END AS `@row_num_in_page`, f.* FROM fabula as f, (SELECT @row_num:=0) AS t, (SELECT @row_num_in_page:=-1) AS t2 ORDER BY f.time_happened DESC ) AS fo WHERE fo.`@row_num_in_page` > 0 AND fo.`@row_num_in_page` <= @paging_size;