-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sergio Rinaudo wrote:
> Hi,
> I have a subquery that causes the mysql error #1241 - Operand should
> contain 1 column(s)
> because zend select adds tablename.* fields within my subquery ( and it
> will work without those tablename.* fields ).
> How to disable this?

The second argument to the from() method is the fields you want to
select from that table (it defaults to *). So, in your subquery, use:

$select = $db->select()->from('tablename', array())...

to select no columns, or add columns to the array if you need them.

- --

Brenton Alker
PHP Developer - Brisbane, Australia

http://blog.tekerson.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpnnM8ACgkQ7bkAtAithuv4YgCePA+PsjkfXn9GOpGjUUMtiUD5
MMgAn2MVdhQs5vUNiWK1WQDldQchnzGR
=Rn8E
-----END PGP SIGNATURE-----

Reply via email to