[Yii]Example of findAllBySql and NOT EXISTS query


Riazul Karim Ivan

Here i am showing use case of NOT EXISTS query and how to run raw query in yii.

If any one want to display only those user name which are not in user role table, then have to run SQL query that with NOT EXISTS.

In UserRole model write a function named: getUserNamesNotExists

Here shows how to use above function in view to display:

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s