I want to check whether my prepared query has returned empty or not without having to go into a loop. This is the code I have tried using:
if(empty($pQuery1->fetch(PDO::FETCH_ASSOC))){}
When I try this I get the error:
Fatal error: Can't use method return value in write context
Whether I use PDO->fetchALL
or PDO->fetch
I receive the same error. Should I be doing something differently?