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条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 启动navicat时报10061错
      • ¥20 关于#pcb工艺#的问题:只需要设计图和设计原理
      • ¥15 关于#gstreamer webrtcbin#的问题,如何解决?
      • ¥15 怎么用c语言函数编写宿舍财务管理系统?
      • ¥15 css网页样式与布局
      • ¥15 三角剖分算法和Alpha shapes 算法求解
      • ¥15 关于#python#的问题:已有代码计算出了2018年—至今的5000+支A股的每日对数收益率,需要设计一种指标进行交易,分析年化收益和夏普比率
      • ¥15 c++模拟网上购书结账系统
      • ¥15 c语言查找数字并排序编程代码
      • ¥15 用stata编写,数据集是Excel形式