postgresql7.1
Select service from jb_services where active_check_p = 't'
Select jb_screen__new (null , null , :user_screen_name , :service ,
'offline' , '' , '' , '1' , 'jb_screen' , null , null , null , null)
Select screen_id from jb_screens where im_screen_name = :user_screen_name and service = :service
update jb_screens SET refcount = refcount + 1 where screen_id = :screen_id
insert into jb_friends
(user_id, friend_screen_id, friend_first_name, friend_last_name)
values (:user_id, :screen_id, :first_names, :last_name)
Select screen_id from jb_screens
where im_screen_name = :user_screen_name and service = :service