Giuseppe
Giuseppe

Reputation: 1

Debugging Query execution in PHP

I have this code:

$room_chan = RoomChannelQuery::create()
  ->filterByChannel($hotel_channel->getChannel())
  ->filterByRoom($res_room->getRoom())
  ->findOneByIdCamera($res_room->getRoom()->getId());

How can I view the query execution in php ?

Upvotes: 0

Views: 95

Answers (1)

j0k
j0k

Reputation: 22756

What do you mean by query execution ?

If you mean, dumping the sql, it can be done like that :

$params = array();
$sql    = BasePeer::createSelectSql($room_chan, $params);
var_dump($sql);

or

var_dump($room_chan->toString());

Upvotes: 2

Related Questions