SELECT dash_users.id,dash_users.email FROM dash_users LEFT JOIN restaurant ON restaurant.vid = dash_users.id WHERE NOT EXISTS (SELECT 1 FROM dash_users WHERE dash_users.id=restaurant.vid ) ORDER BY restaurant.id DESC limit 0,100 Post navigation Access model from view in codeigniter Reduce .apk size of nativescript