I'm having a very strange problem whilst trying to use the showthread_linear hook to get a list of UID's in a thread. I'm trying to use this hook (rather than the postbit) to try cut down the number of queries I'm using in one of my plugins. Here's my current code:
That should work, right? I should have a perfect string of UIDs. However, printing this out shows absolutely nothing but the following:
Obviously, something's wrong somewhere. I can't for the life of me, figure out what though... Any help would be much appreciated.
function myFunction()
{
global $query, $db;
$uidList = "uid IN(";
$comma = "";
while ($uid = $db->fetch_field($query, 'uid')) {
$uidList .= "$comma'$uid'";
$comma = ",";
}
$uidList .= ")";
}
That should work, right? I should have a perfect string of UIDs. However, printing this out shows absolutely nothing but the following:
uid IN()
Obviously, something's wrong somewhere. I can't for the life of me, figure out what though... Any help would be much appreciated.