Union Query with Zend_Validate_Db_RecordExists

For programming and general questions on Zend Framework
Post Reply
amit251
Posts: 1
Joined: Tue May 16, 2017 1:33 pm

Union Query with Zend_Validate_Db_RecordExists

Post by amit251 » Tue May 16, 2017 1:36 pm

How to write a code in php zend to check if record exists or not.

I have the following query which works fine and gives the proper results

Code: Select all

(SELECT * FROM email where isLogged = 1 and emailId='some email address') 
UNION 
(SELECT * FROM email where idPeople = 5 and emailId='some email address');
I want to write this query using Zend_Validate_Db_RecordExists to check if record with

Code: Select all

email= 'some email address'
exists or not under said conditions.

Post Reply