I have a lot of php code that runs against a MySQL MyISAM database using the old (deprecated) mysql driver. I am trying to get the applications to run under Resin/quercus (4.0.37) with the desire to use multiple prepared statements against a single database connection. However, we keep running into the following error.

The code is fairly simple. I get a connection, prepare 2 statements but when I execute the first, the error is thrown. If I only prepare the one statement and execute, it works fine. This is show stopper for us. We need to prepare multiple statements. Does anyone have an example?