Most of this script is familiar. All the code you’ve been using to print out rows stays
the same. That code just moves inside the if ($return_rows) block, because it only
applies if the user put in something like a SELECT that returns (potentially) lots of
results.