This is an area where the behavior of PDO is going to depend on the database you're using and the PDO driver implementation. You might be able to execute new queries while you're still fetching the results of a select statement, or you might not.
In general, the safest and most compatible way to use PDO connections is:
- execute your SELECT statement
- fetch all of the rows you need
- close the cursor (eg: with
$pds1->closeCursor()
) - execute your next query