No. The only thing Zend_Db_Select that is RDBMS specific is use Zend_Db_Adapter_* quote/quoteInto/quoteIdentifier methods.

On 18/02/2009 1:58 PM, Ben Scholzen 'DASPRiD' wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually, when you want to switch the DB engine, it does matter.
...................................
:  ___   _   ___ ___ ___ _ ___    :
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:........:........................:
: Web    : http://www.dasprids.de :
: E-mail : [email protected]       :
: Jabber : [email protected]     :
: ICQ    : 105677955              :
:........:........................:


Jason Webster schrieb:
Not that I'm aware of, but....

Why do you have to use Zend_Db_Select to do this??
If it's a static query like that, that isn't built procedurally, there's
nothing wrong with just using the SQL statement.

On 18/02/2009 10:31 AM, Henry Umansky wrote:
Is there an easy way to run the following query using Zend_Db_Select
without using joins?

SELECT
(SELECT Count(*) FROM articles WHERE status=0) AS 'Draft',
(SELECT Count(*) FROM articles WHERE status=1) AS 'Review',
(SELECT Count(*) FROM articles WHERE status=2) AS 'Published'

I just need to get the count according to the record status.

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

iEYEARECAAYFAkmchHkACgkQ0HfT5Ws789D4jQCdHjqk0/Utv3aSpoDBASOkyb2p
+GEAniYqvAORTA+KnjLcTL50e0pjUHyK
=+W62
-----END PGP SIGNATURE-----

Reply via email to