PDO::EXEC the result returned is not of an
PDOStatement but an integer of the rows affected.
PDO::QUERY the result returned is a
So the answer is it depends on what you need to do with the data, if you need to run query and not do anything with the results, then you should use
exec to execute the query, otherwise if you need the number of rows, the data returned you should use
pdo::query and then use the results returned by the call.
in regards to the bug there are several work around that you can take
- Update your PHP To the latest stable release where it has been passed and patched.
the second issue may have some issues on 64bit's OS's and Some windows configurations.
Bug Information: http://bugs.php.net/bug.php?id=47224