You probable didn't use the standard table when you installed coppermine. The standard table prefix is cpg. Which is what is used in the random image mod. Just go through and replace the cpg_ prefix with your own. Like
$queryaid = mysql_query("SELECT * FROM `cpg_albums` where visibility ='0'");
Change to :
$queryaid = mysql_query("SELECT * FROM `NAMEOFYOURTABLE_albums` where visibility ='0'");
DON'T LEAVE "NAMEOFYOURTABLE" THERE CHANE IT TO THE NAME OF YOUR TABLE
Should be around lines 119 and 140 for the users not loged in function.
There are a few more in there you should probable hunt down too before they give you problems
UPDATE :
Added ability to change the table prefix through Admin
Fixed Error caused by having coppermine in a different database from Thumb Rotater module (was causing all modules placed after it to have SQL errors)
You can download the new file from
HERE