SELECT xx.uid AS rosterID, xx.username AS username, CONCAT( yy.username, ‘@more.cc’ ) AS jid, 3, -1, -1, yy.username AS nick
FROM users_friends
INNER JOIN users xx ON xx.uid = users_friends.uid_asking
INNER JOIN users yy ON yy.uid = users_friends.uid_asked
WHERE users_friends.status = ‘ok’
)
UNION (
SELECT yy.uid AS rosterID, yy.username AS username, CONCAT( xx.username, ‘@more.cc’ ) AS jid, 3, -1, -1, xx.username AS nick
FROM users_friends
INNER JOIN users xx ON xx.uid = users_friends.uid_asking
INNER JOIN users yy ON yy.uid = users_friends.uid_asked
WHERE users_friends.status = ‘ok’
)
this is giving me problem with the rosterID which is unique.
so, you think that this is the only way to have the buddy list precompiled?
this is giving me problem with the rosterID which is unique.
As far as I know, rosterID is just an continuous number, to have an clear identification for each entry. It’s only used to groups contacts in your roster. Since you seem not to have any groups in your exiting database, maybe you can simply set this column temporarily to auto_increment? (not thought long about that)
However, when SQL-commands are not sufficient for some reason, you could also write some kind of plugin for Openfire, which imports that data.