Questions tagged [tablegateway]

The TableGateway is the basic way to access database by zend-framework2

The object is intended to provide an object that represents a table in a database, and the methods of this object mirror the most common operations on a database table.

There are two primary implementations of the that are of the most useful: and . The is an abstract basic implementation that provides functionality for select(), insert(), update(), delete(), as well as an additional API for doing these same kinds of tasks with explicit objects. These methods are selectWith(), insertWith(), updateWith() and deleteWith(). In addition, also implements a “Feature” API, that allows for expanding the behaviors of the base implementation without having to extend the class with this new functionality. The concrete implementation simply adds a sensible constructor to the class so that out-of-the-box, does not need to be extended in order to be consumed and utilized to its fullest.

63 questions
0
votes
2 answers

zf2 - join using a using Zend\Db\TableGateway\TableGateway;

I want to do a simple join using zf2 selecting fields from the first and second table, but I get an error ('Statement could not be executed') when I try to put an array of fields into the columns method. public function fetchAll() { $resultSet =…
jj-aa
  • 1,019
  • 5
  • 19
  • 39
0
votes
1 answer

ZF2 TableGateway doesn't works when insert a row

I've got a fatal error when I intent insert a row in DB. I don't understand what's happening, I readed some blogs but there is not a solution, my code is the same like an example publicated by Evan in his blog. My model class class CommentTable…
jortsc
  • 308
  • 2
  • 11
-1
votes
1 answer

Zend Framwork 2 - Tablegateway - Updating only one column of a row in DB

I have a table called users. It has the following columns: id name username email User can not edit any data from this table except the username column. The question is that when user wants to edit his username, what would the query be in ZF2…
Furquan Ul Haque
  • 15
  • 1
  • 1
  • 7
1 2 3 4
5