ok trying to add this in using a separate database put in the line
$query = "SELECT id,cat,title,bigimage,medsize FROM {$pp_prefix}photos WHERE userid = {$user['U_Number']} ORDER BY date DESC LIMIT $page,16";
$result = mysql_query($query);
$sth = $dbh -> do_query($query);
mysql_select_db ("threads")or die("Could not select database");
This is the error I get
SQL ERROR: Database error only visible to forum administrators
Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133
SQL ERROR: Database error only visible to forum administrators
Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 160
Warning: Supplied argument is not a valid MySQL result resource in /home2/www/steelheader/ubbthreads/mysql.inc.php on line 133