@just_some_guy: you have contributed some code snippets in various threads that suggest to run a native mysql query against the database even though you're on a coppermine-driven page. Your efforts to contribute are welcome in the first place, but your advice is just not correct, so it's our moderation task to clarify. Your code is wrong and not recommended. Don't run additional queries if you can avoid this, and don't add another potential point of failure by running native mysql commands. Take a look into coppermine's core code: there are functions that for database call abstraction. In your case, take a look at the functions cpg_db_connect, cpg_db_query, cpg_db_error, cpg_db_fetch_rowset etc.
In this case, Stramm's suggestions are the correct ones. They are much easier to apply, they don't cause extra load and don't add potential issues with queries being run improperly.