Thursday, 29 August 2013

How to write where condition in zend framework 2

How to write where condition in zend framework 2

Sql query is Select * from agent where agentid = 2;
I am using this code
$where = new Where();
$where->Equal To('agent_id', $id);
$resultset = $this->tableGateway->select($where);
It's giving me error.
"Parse error: syntax error, unexpected T_STRING"
Please help me.

No comments:

Post a Comment