views:

31

answers:

1

This is the code in ZF (simplification of a real problem):

<?php
$nested = $table->select()
  ->where('name = :var')
  ->bind(array('var' => 'my value'));
$select = $table->select()
  ->join(array('nested' => $nested), 'nested.id = id', array());
$table->fetchAll($select);

The variable :var is not "bind-ed" in this scenario. What am I doing wrong?

+3  A: 

Never seen "bind" before on an Zend Framework Application. Try to use

$select->where('name = ?', 'my_value');
ArneRie