The first SELECT for example returns 57 and 61. I want the second sql command to use returned rows of first SELECT not like what I have put here (manually 57 and 61). Finally calculate sum of these results. (9 is the result of course)
1. SELECT id FROM permissions WHERE title = 'samplezip'
2. SELECT count(id) FROM accesslogs WHERE urlid=57 AND status='d' //result 7
3. SELECT count(id) FROM accesslogs WHERE urlid=61 AND status='d' //result 2