Запрос Sql:
SELECT test.* FROM test JOIN test_shares
WHERE test.test_id = test_shares.test_id
AND test_shares.email_address = '$email'
AND test.url is NOT NULL ORDER BY title ASC;
Переписано как Zend_Db_Select
оператор.
$select = $db->select ()
->from ( 'test', 'test.*' )
->join ( 'test_shares', array () )
->where ( 'test.test_id = test_shares.test_id')
->where ( 'test_shares.email_address = ?', '$email')
->where ( 'test.url is NOT NULL')
->order ( 'title' );
echo $select;
Вывод:
SELECT test.* FROM test JOIN test_shares ON Array
WHERE test.test_id = test_shares.test_id
AND test_shares.email_address = '$email'
AND test.url is NOT NULL ORDER BY title ASC
Пожалуйста, предложите, почему этот 'ON Array' показывает.