I've added this code as I read above:
// Selecting the PhotoPost Database
[:"red"]mysql_select_db ("smoknz28_photopost")or die("Could not select database");[/]
$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);
$numrows = $dbh -> total_rows($sth);
But I'm having the same results.