OOP php method - pass parameters in or get from inside object
Which is the better should not depend on mainly speed. I think you should post more code (at least the name of class and its responsibilities or the list of its functions).

Some other notes:


It's really hard to read code which contains one character long variable names:

$r = mssql_fetch_row($res);


You have to decode them. I'd rename it to $row. The same true for the SQL queries: logins AS l. I would let it be logins.
In the second version there are three variable naming convention: $skID, $prodId, $page_id. Try to be consistent and use just one: they should be $skId, $prodId, $pageId or $skID, $prodID, $pageID or $sk_id, $prod_id, $page_id. (I think the first, the camelCase version is the most readable.)
There is no error handling in the code. What happens when the query returns empty results?
Probably the code is vulnerable to SQL injections: http://en.wikipedia.org/wiki/SQL_injection
Try accessing database attributes with keys not numeric indexes.

$url = trim($r[0]); 
$page_id = $r[1];


The following would be more readable:

$url = trim($r["url"]); 
$page_id = $r["id"];