That won't work. The RS object needs to have a SELECT statement that returns a result. The SQL you are using is causing an error.
You might be able to use something like:
SELECT (SET SESSION SQL_BIG_SELECTS = 1) AS ResultVal
But you would have to test it in your phpMyAdmin and make sure since I'm not familiar with using SET SESSION calls in general in MySQL.