mokujin
04-23-2010, 08:52 PM
hello,
I have this SQL
$buddys = $db->query_read("
SELECT user.username, user.userid
FROM " . TABLE_PREFIX . "userlist AS userlist
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = userlist.relationid)
WHERE userlist.userid = {$vbulletin->userinfo['userid']} AND userlist.relationid = user.userid AND type = 'buddy'
");
Now how do I get all userid to one line like this: $buddyids = "1,9,67,89,102" ???
I want to use $buddyids to work with another query
Please help me
Thank you
--------------- Added 1272139718 at 1272139718 ---------------
No one can help me? Thank s
I have this SQL
$buddys = $db->query_read("
SELECT user.username, user.userid
FROM " . TABLE_PREFIX . "userlist AS userlist
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = userlist.relationid)
WHERE userlist.userid = {$vbulletin->userinfo['userid']} AND userlist.relationid = user.userid AND type = 'buddy'
");
Now how do I get all userid to one line like this: $buddyids = "1,9,67,89,102" ???
I want to use $buddyids to work with another query
Please help me
Thank you
--------------- Added 1272139718 at 1272139718 ---------------
No one can help me? Thank s