Last active
November 8, 2015 17:18
-
-
Save AKB428/b7451010a9cae1edf906 to your computer and use it in GitHub Desktop.
MySQL と MariaDBの プリペアドステートメント バインドパラメーターがSQL関数だった時の挙動の違い ref: http://qiita.com/AKB428/items/8be7059e7e2919cea090
This file contains 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 characters
SELECT h.follower, h.updated_at | |
from twitter_status_histories as h, | |
(SELECT id FROM bases WHERE twitter_account = 'usagi_anime' order by id desc limit 1) b | |
where h.bases_id = b.id AND h.updated_at < ? order by h.updated_at desc limit 100 |
This file contains 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 characters
SELECT h.follower, h.updated_at | |
from twitter_status_histories as h, | |
(SELECT id FROM bases WHERE twitter_account = 'usagi_anime' order by id desc limit 1) b | |
where h.bases_id = b.id AND h.updated_at < 'now()' order by h.updated_at desc limit 100 |
This file contains 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 characters
follower updated_at | |
51345 2014-09-23 18:53:27 | |
50606 2014-09-14 14:55:02 | |
50607 2014-09-14 14:50:04 | |
46350 2014-08-11 16:44:05 |
This file contains 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 characters
follower updated_at | |
51345 2014-09-23 18:53:27 | |
50606 2014-09-14 14:55:02 | |
50607 2014-09-14 14:50:04 | |
46350 2014-08-11 16:44:05 |
This file contains 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 characters
Empty set, 1 warning (0.00 sec) |
This file contains 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 characters
SELECT h.follower, h.updated_at | |
from twitter_status_histories as h, | |
(SELECT id FROM bases WHERE twitter_account = 'usagi_anime' order by id desc limit 1) b | |
where h.bases_id = b.id AND h.updated_at < now() order by h.updated_at desc limit 100 |
This file contains 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 characters
| 133727 | 2015-11-07 12:00:06 | | |
| 133717 | 2015-11-07 11:30:07 | | |
| 133707 | 2015-11-07 11:00:07 | | |
| 133701 | 2015-11-07 10:30:06 | |
This file contains 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 characters
| 133727 | 2015-11-07 12:00:06 | | |
| 133717 | 2015-11-07 11:30:07 | | |
| 133707 | 2015-11-07 11:00:07 | | |
| 133701 | 2015-11-07 10:30:06 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment