douyun6781 2014-06-14 15:08
浏览 31
已采纳

Zend Framework 2:TableGateway

I am using the TableGateway from Zend Framework 2. My problem is that I cannot get the between function to work.

This is my code that I have for now, the output is just nothing:

public function fetchBetween($startDate, $endDate)
{
    $where = new Where();
    $where->between('date', $startDate, $endDate);

    $resultSet = $this->tableGateway->select($where);
    return $resultSet;
}

I am calling this function to get the date between two dates.

$this->getCalendarTable()->fetchBetween('4-04-2014', '30-05-2014');

PHPMyadmin table

This is the query that it has to be and in phpmyadmin it is giving back data so there is nothing wrong with the query or the databank:

SELECT * FROM `klj_agenda` WHERE date BETWEEN '1-05-2014' AND '30-05-2014'
  • 写回答

2条回答 默认 最新

  • douhao7889 2014-06-15 10:54
    关注

    The problem was the query: 2014-05-01 instead of 01-05-2014

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同