If I have to query db and do something one the basis of number of rows , in mysql I simply query and I can simply query and use simply
if($result->num_rows >= 1){
but in PDO I have to
- make count query , the use
fetchCloumn()
to get count - query again to get the same result and do whatever I want
Rowcount is not helpful , it doesn't work on select
so I am making query twice, PDO doesn't sounds to be helpful here, is my approach wrong or I am right? Thanks