我用谷歌搜索但没有找到任何相关的东西。我有一个这样的 MySQL 表:
+++++++++++++++++++++++++++++++++++ | 房间号 | 日期 | 价格 | +++++++++++++++++++++++++++++++++++ | 1 | 2012-10-10 | 10 | | 1 | 2012-10-11 | 10 | | 1 | 2012-10-12 | 10 | | 1 | 2012-10-13 | 12 | | 2 | 2012-10-10 | 15 | | 2 | 2012-10-11 | 15 | | 2 | 2012-10-12 | 15 | | 2 | 2012-10-13 | 16 | | 2 | 2012-10-14 | 16 | | 2 | 2012-10-15 | 16 | +++++++++++++++++++++++++++++++++++
我需要根据价格和 roomID 获取期间:
++++++++++++++++++++++++++++++++++++++++++++++++ | 房间号 | 来自 | 直到 | 价格 | ++++++++++++++++++++++++++++++++++++++++++++++++ | 1 | 2012-10-10 | 2012-10-12 | 10 | | 1 | 2012-10-13 | 2012-10-13 | 12 | | 2 | 2012-10-10 | 2012-10-12 | 15 | | 2 | 2012-10-13 | 2012-10-15 | 16 | ++++++++++++++++++++++++++++++++++++++++++++++++
谢谢!